tryton-sao 7.4.2 → 7.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ Version 7.4.3 - 2025-01-01
3
+ --------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
2
7
  Version 7.4.2 - 2024-12-16
3
8
  --------------------------
4
9
  * Bug fixes (see mercurial logs for details)
@@ -10086,8 +10086,8 @@ img.icon {
10086
10086
  .board .form-one2one select,
10087
10087
  .form .form-reference select,
10088
10088
  .board .form-reference select,
10089
- .form form-binary select,
10090
- .board form-binary select {
10089
+ .form .form-binary select,
10090
+ .board .form-binary select {
10091
10091
  min-width: 8ch;
10092
10092
  }
10093
10093
  .form .form-many2one input,
@@ -10096,8 +10096,8 @@ img.icon {
10096
10096
  .board .form-one2one input,
10097
10097
  .form .form-reference input,
10098
10098
  .board .form-reference input,
10099
- .form form-binary input,
10100
- .board form-binary input {
10099
+ .form .form-binary input,
10100
+ .board .form-binary input {
10101
10101
  min-width: 12ch;
10102
10102
  }
10103
10103
  @media screen and (min-width: 768px) {
@@ -3,7 +3,7 @@
3
3
 
4
4
  /* eslint-disable no-redeclare */
5
5
  var Sao = {
6
- __version__: '7.4.2',
6
+ __version__: '7.4.3',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
@@ -8796,6 +8796,7 @@ var Sao = {
8796
8796
  }
8797
8797
  }
8798
8798
  if (!jQuery.isEmptyObject(values)) {
8799
+ values.id = this.id;
8799
8800
  var changes;
8800
8801
  try {
8801
8802
  if ((fieldnames.length == 1) ||
@@ -8878,6 +8879,7 @@ var Sao = {
8878
8879
  [values], this.get_context(), false));
8879
8880
  }
8880
8881
  } else {
8882
+ values.id = this.id;
8881
8883
  changed = this.model.execute(
8882
8884
  'on_change_with',
8883
8885
  [values, fieldnames], this.get_context(), false);
@@ -8910,6 +8912,7 @@ var Sao = {
8910
8912
  [values], this.get_context(), false));
8911
8913
  }
8912
8914
  } else {
8915
+ values.id = this.id;
8913
8916
  changed = this.model.execute(
8914
8917
  'on_change_with',
8915
8918
  [values, fieldnames], this.get_context(), false);
@@ -8965,6 +8968,7 @@ var Sao = {
8965
8968
  on_scan_code: function(code, depends) {
8966
8969
  depends = this.expr_eval(depends);
8967
8970
  var values = this._get_on_change_args(depends);
8971
+ values.id = this.id;
8968
8972
  return this.model.execute(
8969
8973
  'on_scan_code', [values, code], this.get_context(),
8970
8974
  true, false).then((changes) => {
@@ -10253,8 +10257,7 @@ var Sao = {
10253
10257
  if (record.model.name == this.description.relation) {
10254
10258
  model = record.model;
10255
10259
  }
10256
- var context = record.expr_eval(this.description.context || {});
10257
- var group = Sao.Group(model, context, []);
10260
+ var group = Sao.Group(model, {}, []);
10258
10261
  group.set_parent(record);
10259
10262
  group.parent_name = this.description.relation_field;
10260
10263
  group.child_name = this.name;
@@ -11821,7 +11824,7 @@ var Sao = {
11821
11824
  var record = this.screen.current_record;
11822
11825
  var menu = dropdown.find('.dropdown-menu');
11823
11826
  menu.empty();
11824
- Sao.Window.Attachment.get_attachments(record)
11827
+ return Sao.Window.Attachment.get_attachments(record)
11825
11828
  .then(function(attachments) {
11826
11829
  attachments.forEach(function(value) {
11827
11830
  var name = value[0],
@@ -12410,7 +12413,8 @@ var Sao = {
12410
12413
  'use strict';
12411
12414
 
12412
12415
  Sao.ScreenContainer = Sao.class_(Object, {
12413
- init: function(tab_domain) {
12416
+ init: function(screen, tab_domain) {
12417
+ this.screen = screen;
12414
12418
  this.alternate_viewport = jQuery('<div/>', {
12415
12419
  'class': 'screen-container'
12416
12420
  });
@@ -12795,13 +12799,10 @@ var Sao = {
12795
12799
  do_search: function() {
12796
12800
  return this.screen.search_filter(this.get_text());
12797
12801
  },
12798
- set_screen: function(screen) {
12799
- this.screen = screen;
12800
- this.but_bookmark.prop('disabled',
12801
- jQuery.isEmptyObject(this.bookmarks()));
12802
- this.bookmark_match();
12803
- },
12804
12802
  show_filter: function() {
12803
+ this.but_bookmark.prop(
12804
+ 'disabled', jQuery.isEmptyObject(this.bookmarks()));
12805
+ this.bookmark_match();
12805
12806
  this.filter_box.show();
12806
12807
  if (this.tab) {
12807
12808
  this.tab.show();
@@ -13221,7 +13222,7 @@ var Sao = {
13221
13222
  this.new_group(attributes.context || {});
13222
13223
  this.current_record = null;
13223
13224
  this.screen_container = new Sao.ScreenContainer(
13224
- attributes.tab_domain);
13225
+ this, attributes.tab_domain);
13225
13226
  this.breadcrumb = attributes.breadcrumb || [];
13226
13227
 
13227
13228
  this.context_screen = null;
@@ -14156,7 +14157,6 @@ var Sao = {
14156
14157
  },
14157
14158
  search_active: function(active) {
14158
14159
  if (active && !this.group.parent) {
14159
- this.screen_container.set_screen(this);
14160
14160
  this.screen_container.show_filter();
14161
14161
  } else {
14162
14162
  this.screen_container.hide_filter();
@@ -14424,6 +14424,7 @@ var Sao = {
14424
14424
  if (attributes.type === 'instance') {
14425
14425
  var args = record.expr_eval(attributes.change || []);
14426
14426
  var values = record._get_on_change_args(args);
14427
+ values.id = record.id;
14427
14428
  return record.model.execute(attributes.name, [values],
14428
14429
  this.context).then(function(changes) {
14429
14430
  record.set_on_change(changes);
@@ -27296,6 +27297,7 @@ function eval_pyson(value){
27296
27297
  this.el_add_field_names.prop('checked', export_.values.header);
27297
27298
  this.selected_records.val(
27298
27299
  JSON.stringify(export_.values.records == 'selected'));
27300
+ this.selected_records.change();
27299
27301
  },
27300
27302
  _traverse: function(fields, prefix, parents, i) {
27301
27303
  var field, item;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "tryton-sao",
3
3
  "title": "sao",
4
4
  "description": "Tryton webclient",
5
- "version": "7.4.2",
5
+ "version": "7.4.3",
6
6
  "homepage": "https://www.tryton.org/",
7
7
  "author": {
8
8
  "name": "Tryton"
package/src/model.js CHANGED
@@ -1097,6 +1097,7 @@
1097
1097
  }
1098
1098
  }
1099
1099
  if (!jQuery.isEmptyObject(values)) {
1100
+ values.id = this.id;
1100
1101
  var changes;
1101
1102
  try {
1102
1103
  if ((fieldnames.length == 1) ||
@@ -1179,6 +1180,7 @@
1179
1180
  [values], this.get_context(), false));
1180
1181
  }
1181
1182
  } else {
1183
+ values.id = this.id;
1182
1184
  changed = this.model.execute(
1183
1185
  'on_change_with',
1184
1186
  [values, fieldnames], this.get_context(), false);
@@ -1211,6 +1213,7 @@
1211
1213
  [values], this.get_context(), false));
1212
1214
  }
1213
1215
  } else {
1216
+ values.id = this.id;
1214
1217
  changed = this.model.execute(
1215
1218
  'on_change_with',
1216
1219
  [values, fieldnames], this.get_context(), false);
@@ -1266,6 +1269,7 @@
1266
1269
  on_scan_code: function(code, depends) {
1267
1270
  depends = this.expr_eval(depends);
1268
1271
  var values = this._get_on_change_args(depends);
1272
+ values.id = this.id;
1269
1273
  return this.model.execute(
1270
1274
  'on_scan_code', [values, code], this.get_context(),
1271
1275
  true, false).then((changes) => {
@@ -2554,8 +2558,7 @@
2554
2558
  if (record.model.name == this.description.relation) {
2555
2559
  model = record.model;
2556
2560
  }
2557
- var context = record.expr_eval(this.description.context || {});
2558
- var group = Sao.Group(model, context, []);
2561
+ var group = Sao.Group(model, {}, []);
2559
2562
  group.set_parent(record);
2560
2563
  group.parent_name = this.description.relation_field;
2561
2564
  group.child_name = this.name;
package/src/sao.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  /* eslint-disable no-redeclare */
5
5
  var Sao = {
6
- __version__: '7.4.2',
6
+ __version__: '7.4.3',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
package/src/sao.less CHANGED
@@ -871,7 +871,7 @@ img.icon {
871
871
  width: calc(19ch + @input-height-base);
872
872
  }
873
873
  }
874
- .form-many2one, .form-one2one, .form-reference, form-binary {
874
+ .form-many2one, .form-one2one, .form-reference, .form-binary {
875
875
  select {
876
876
  min-width: 8ch;
877
877
  }
package/src/screen.js CHANGED
@@ -4,7 +4,8 @@
4
4
  'use strict';
5
5
 
6
6
  Sao.ScreenContainer = Sao.class_(Object, {
7
- init: function(tab_domain) {
7
+ init: function(screen, tab_domain) {
8
+ this.screen = screen;
8
9
  this.alternate_viewport = jQuery('<div/>', {
9
10
  'class': 'screen-container'
10
11
  });
@@ -389,13 +390,10 @@
389
390
  do_search: function() {
390
391
  return this.screen.search_filter(this.get_text());
391
392
  },
392
- set_screen: function(screen) {
393
- this.screen = screen;
394
- this.but_bookmark.prop('disabled',
395
- jQuery.isEmptyObject(this.bookmarks()));
396
- this.bookmark_match();
397
- },
398
393
  show_filter: function() {
394
+ this.but_bookmark.prop(
395
+ 'disabled', jQuery.isEmptyObject(this.bookmarks()));
396
+ this.bookmark_match();
399
397
  this.filter_box.show();
400
398
  if (this.tab) {
401
399
  this.tab.show();
@@ -815,7 +813,7 @@
815
813
  this.new_group(attributes.context || {});
816
814
  this.current_record = null;
817
815
  this.screen_container = new Sao.ScreenContainer(
818
- attributes.tab_domain);
816
+ this, attributes.tab_domain);
819
817
  this.breadcrumb = attributes.breadcrumb || [];
820
818
 
821
819
  this.context_screen = null;
@@ -1750,7 +1748,6 @@
1750
1748
  },
1751
1749
  search_active: function(active) {
1752
1750
  if (active && !this.group.parent) {
1753
- this.screen_container.set_screen(this);
1754
1751
  this.screen_container.show_filter();
1755
1752
  } else {
1756
1753
  this.screen_container.hide_filter();
@@ -2018,6 +2015,7 @@
2018
2015
  if (attributes.type === 'instance') {
2019
2016
  var args = record.expr_eval(attributes.change || []);
2020
2017
  var values = record._get_on_change_args(args);
2018
+ values.id = record.id;
2021
2019
  return record.model.execute(attributes.name, [values],
2022
2020
  this.context).then(function(changes) {
2023
2021
  record.set_on_change(changes);
package/src/tab.js CHANGED
@@ -1142,7 +1142,7 @@
1142
1142
  var record = this.screen.current_record;
1143
1143
  var menu = dropdown.find('.dropdown-menu');
1144
1144
  menu.empty();
1145
- Sao.Window.Attachment.get_attachments(record)
1145
+ return Sao.Window.Attachment.get_attachments(record)
1146
1146
  .then(function(attachments) {
1147
1147
  attachments.forEach(function(value) {
1148
1148
  var name = value[0],
package/src/window.js CHANGED
@@ -2184,6 +2184,7 @@
2184
2184
  this.el_add_field_names.prop('checked', export_.values.header);
2185
2185
  this.selected_records.val(
2186
2186
  JSON.stringify(export_.values.records == 'selected'));
2187
+ this.selected_records.change();
2187
2188
  },
2188
2189
  _traverse: function(fields, prefix, parents, i) {
2189
2190
  var field, item;