tryton-sao 7.2.12 → 7.2.14

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,14 @@
1
1
 
2
+ Version 7.2.14 - 2025-01-16
3
+ ---------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
7
+ Version 7.2.13 - 2025-01-01
8
+ ---------------------------
9
+ * Bug fixes (see mercurial logs for details)
10
+
11
+
2
12
  Version 7.2.12 - 2024-12-16
3
13
  ---------------------------
4
14
  * Bug fixes (see mercurial logs for details)
package/COPYRIGHT CHANGED
@@ -1,7 +1,7 @@
1
1
  Copyright (C) 2012-2024 Nicolas Évrard.
2
- Copyright (C) 2012-2024 Cédric Krier.
2
+ Copyright (C) 2012-2025 Cédric Krier.
3
3
  Copyright (C) 2012-2014 Bertrand Chenal.
4
- Copyright (C) 2012-2024 B2CK SPRL.
4
+ Copyright (C) 2012-2025 B2CK SPRL.
5
5
  Copyright (C) 2019 Jitbit.
6
6
  Copyright (C) 2013 Thomas Park
7
7
  Copyright (C) 2020-2021 Maxime Richez
@@ -10018,8 +10018,8 @@ img.icon {
10018
10018
  .board .form-one2one select,
10019
10019
  .form .form-reference select,
10020
10020
  .board .form-reference select,
10021
- .form form-binary select,
10022
- .board form-binary select {
10021
+ .form .form-binary select,
10022
+ .board .form-binary select {
10023
10023
  min-width: 8ch;
10024
10024
  }
10025
10025
  .form .form-many2one input,
@@ -10028,8 +10028,8 @@ img.icon {
10028
10028
  .board .form-one2one input,
10029
10029
  .form .form-reference input,
10030
10030
  .board .form-reference input,
10031
- .form form-binary input,
10032
- .board form-binary input {
10031
+ .form .form-binary input,
10032
+ .board .form-binary input {
10033
10033
  min-width: 12ch;
10034
10034
  }
10035
10035
  @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.2.12',
6
+ __version__: '7.2.14',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
@@ -7659,7 +7659,7 @@ var Sao = {
7659
7659
  'use strict';
7660
7660
 
7661
7661
  function get_x2m_sub_fields(f_attrs, prefix) {
7662
- if (f_attrs.loading == 'eager' && f_attrs.views) {
7662
+ if (f_attrs.visible && f_attrs.views) {
7663
7663
  // There's only one key but we don't know its value
7664
7664
  const [[, view],] = Object.entries(f_attrs.views);
7665
7665
 
@@ -8756,6 +8756,7 @@ var Sao = {
8756
8756
  }
8757
8757
  }
8758
8758
  if (!jQuery.isEmptyObject(values)) {
8759
+ values.id = this.id;
8759
8760
  var changes;
8760
8761
  try {
8761
8762
  if ((fieldnames.length == 1) ||
@@ -8838,6 +8839,7 @@ var Sao = {
8838
8839
  [values], this.get_context(), false));
8839
8840
  }
8840
8841
  } else {
8842
+ values.id = this.id;
8841
8843
  changed = this.model.execute(
8842
8844
  'on_change_with',
8843
8845
  [values, fieldnames], this.get_context(), false);
@@ -8870,6 +8872,7 @@ var Sao = {
8870
8872
  [values], this.get_context(), false));
8871
8873
  }
8872
8874
  } else {
8875
+ values.id = this.id;
8873
8876
  changed = this.model.execute(
8874
8877
  'on_change_with',
8875
8878
  [values, fieldnames], this.get_context(), false);
@@ -8925,6 +8928,7 @@ var Sao = {
8925
8928
  on_scan_code: function(code, depends) {
8926
8929
  depends = this.expr_eval(depends);
8927
8930
  var values = this._get_on_change_args(depends);
8931
+ values.id = this.id;
8928
8932
  return this.model.execute(
8929
8933
  'on_scan_code', [values, code], this.get_context(),
8930
8934
  true, false).then((changes) => {
@@ -10237,8 +10241,7 @@ var Sao = {
10237
10241
  if (record.model.name == this.description.relation) {
10238
10242
  model = record.model;
10239
10243
  }
10240
- var context = record.expr_eval(this.description.context || {});
10241
- var group = Sao.Group(model, context, []);
10244
+ var group = Sao.Group(model, {}, []);
10242
10245
  group.set_parent(record);
10243
10246
  group.parent_name = this.description.relation_field;
10244
10247
  group.child_name = this.name;
@@ -11800,7 +11803,7 @@ var Sao = {
11800
11803
  var record = this.screen.current_record;
11801
11804
  var menu = dropdown.find('.dropdown-menu');
11802
11805
  menu.empty();
11803
- Sao.Window.Attachment.get_attachments(record)
11806
+ return Sao.Window.Attachment.get_attachments(record)
11804
11807
  .then(function(attachments) {
11805
11808
  attachments.forEach(function(value) {
11806
11809
  var name = value[0],
@@ -12383,7 +12386,8 @@ var Sao = {
12383
12386
  'use strict';
12384
12387
 
12385
12388
  Sao.ScreenContainer = Sao.class_(Object, {
12386
- init: function(tab_domain) {
12389
+ init: function(screen, tab_domain) {
12390
+ this.screen = screen;
12387
12391
  this.alternate_viewport = jQuery('<div/>', {
12388
12392
  'class': 'screen-container'
12389
12393
  });
@@ -12768,13 +12772,10 @@ var Sao = {
12768
12772
  do_search: function() {
12769
12773
  return this.screen.search_filter(this.get_text());
12770
12774
  },
12771
- set_screen: function(screen) {
12772
- this.screen = screen;
12773
- this.but_bookmark.prop('disabled',
12774
- jQuery.isEmptyObject(this.bookmarks()));
12775
- this.bookmark_match();
12776
- },
12777
12775
  show_filter: function() {
12776
+ this.but_bookmark.prop(
12777
+ 'disabled', jQuery.isEmptyObject(this.bookmarks()));
12778
+ this.bookmark_match();
12778
12779
  this.filter_box.show();
12779
12780
  if (this.tab) {
12780
12781
  this.tab.show();
@@ -13194,7 +13195,7 @@ var Sao = {
13194
13195
  this.new_group(attributes.context || {});
13195
13196
  this.current_record = null;
13196
13197
  this.screen_container = new Sao.ScreenContainer(
13197
- attributes.tab_domain);
13198
+ this, attributes.tab_domain);
13198
13199
  this.breadcrumb = attributes.breadcrumb || [];
13199
13200
 
13200
13201
  this.context_screen = null;
@@ -14115,7 +14116,6 @@ var Sao = {
14115
14116
  },
14116
14117
  search_active: function(active) {
14117
14118
  if (active && !this.group.parent) {
14118
- this.screen_container.set_screen(this);
14119
14119
  this.screen_container.show_filter();
14120
14120
  } else {
14121
14121
  this.screen_container.hide_filter();
@@ -14395,6 +14395,7 @@ var Sao = {
14395
14395
  if (attributes.type === 'instance') {
14396
14396
  var args = record.expr_eval(attributes.change || []);
14397
14397
  var values = record._get_on_change_args(args);
14398
+ values.id = record.id;
14398
14399
  return record.model.execute(attributes.name, [values],
14399
14400
  this.context).then(function(changes) {
14400
14401
  record.set_on_change(changes);
@@ -14913,8 +14914,8 @@ function eval_pyson(value){
14913
14914
  return;
14914
14915
  }
14915
14916
 
14916
- if (attributes.loading == 'eager') {
14917
- this.field_attrs[name].loading = 'eager';
14917
+ if (attributes.visible) {
14918
+ this.field_attrs[name].visible = true;
14918
14919
  }
14919
14920
 
14920
14921
  var WidgetFactory = Sao.View.FormXMLViewParser.WIDGETS[
@@ -27076,6 +27077,7 @@ function eval_pyson(value){
27076
27077
  this.el_add_field_names.prop('checked', export_.values.header);
27077
27078
  this.selected_records.val(
27078
27079
  JSON.stringify(export_.values.records == 'selected'));
27080
+ this.selected_records.change();
27079
27081
  },
27080
27082
  _traverse: function(fields, prefix, parents, i) {
27081
27083
  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.2.12",
5
+ "version": "7.2.14",
6
6
  "homepage": "http://www.tryton.org/",
7
7
  "author": {
8
8
  "name": "Tryton"
package/src/model.js CHANGED
@@ -4,7 +4,7 @@
4
4
  'use strict';
5
5
 
6
6
  function get_x2m_sub_fields(f_attrs, prefix) {
7
- if (f_attrs.loading == 'eager' && f_attrs.views) {
7
+ if (f_attrs.visible && f_attrs.views) {
8
8
  // There's only one key but we don't know its value
9
9
  const [[, view],] = Object.entries(f_attrs.views);
10
10
 
@@ -1101,6 +1101,7 @@
1101
1101
  }
1102
1102
  }
1103
1103
  if (!jQuery.isEmptyObject(values)) {
1104
+ values.id = this.id;
1104
1105
  var changes;
1105
1106
  try {
1106
1107
  if ((fieldnames.length == 1) ||
@@ -1183,6 +1184,7 @@
1183
1184
  [values], this.get_context(), false));
1184
1185
  }
1185
1186
  } else {
1187
+ values.id = this.id;
1186
1188
  changed = this.model.execute(
1187
1189
  'on_change_with',
1188
1190
  [values, fieldnames], this.get_context(), false);
@@ -1215,6 +1217,7 @@
1215
1217
  [values], this.get_context(), false));
1216
1218
  }
1217
1219
  } else {
1220
+ values.id = this.id;
1218
1221
  changed = this.model.execute(
1219
1222
  'on_change_with',
1220
1223
  [values, fieldnames], this.get_context(), false);
@@ -1270,6 +1273,7 @@
1270
1273
  on_scan_code: function(code, depends) {
1271
1274
  depends = this.expr_eval(depends);
1272
1275
  var values = this._get_on_change_args(depends);
1276
+ values.id = this.id;
1273
1277
  return this.model.execute(
1274
1278
  'on_scan_code', [values, code], this.get_context(),
1275
1279
  true, false).then((changes) => {
@@ -2582,8 +2586,7 @@
2582
2586
  if (record.model.name == this.description.relation) {
2583
2587
  model = record.model;
2584
2588
  }
2585
- var context = record.expr_eval(this.description.context || {});
2586
- var group = Sao.Group(model, context, []);
2589
+ var group = Sao.Group(model, {}, []);
2587
2590
  group.set_parent(record);
2588
2591
  group.parent_name = this.description.relation_field;
2589
2592
  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.2.12',
6
+ __version__: '7.2.14',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
package/src/sao.less CHANGED
@@ -800,7 +800,7 @@ img.icon {
800
800
  width: calc(19ch + @input-height-base);
801
801
  }
802
802
  }
803
- .form-many2one, .form-one2one, .form-reference, form-binary {
803
+ .form-many2one, .form-one2one, .form-reference, .form-binary {
804
804
  select {
805
805
  min-width: 8ch;
806
806
  }
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;
@@ -1736,7 +1734,6 @@
1736
1734
  },
1737
1735
  search_active: function(active) {
1738
1736
  if (active && !this.group.parent) {
1739
- this.screen_container.set_screen(this);
1740
1737
  this.screen_container.show_filter();
1741
1738
  } else {
1742
1739
  this.screen_container.hide_filter();
@@ -2016,6 +2013,7 @@
2016
2013
  if (attributes.type === 'instance') {
2017
2014
  var args = record.expr_eval(attributes.change || []);
2018
2015
  var values = record._get_on_change_args(args);
2016
+ values.id = record.id;
2019
2017
  return record.model.execute(attributes.name, [values],
2020
2018
  this.context).then(function(changes) {
2021
2019
  record.set_on_change(changes);
package/src/tab.js CHANGED
@@ -1137,7 +1137,7 @@
1137
1137
  var record = this.screen.current_record;
1138
1138
  var menu = dropdown.find('.dropdown-menu');
1139
1139
  menu.empty();
1140
- Sao.Window.Attachment.get_attachments(record)
1140
+ return Sao.Window.Attachment.get_attachments(record)
1141
1141
  .then(function(attachments) {
1142
1142
  attachments.forEach(function(value) {
1143
1143
  var name = value[0],
package/src/view/form.js CHANGED
@@ -63,8 +63,8 @@ function eval_pyson(value){
63
63
  return;
64
64
  }
65
65
 
66
- if (attributes.loading == 'eager') {
67
- this.field_attrs[name].loading = 'eager';
66
+ if (attributes.visible) {
67
+ this.field_attrs[name].visible = true;
68
68
  }
69
69
 
70
70
  var WidgetFactory = Sao.View.FormXMLViewParser.WIDGETS[
package/src/window.js CHANGED
@@ -2116,6 +2116,7 @@
2116
2116
  this.el_add_field_names.prop('checked', export_.values.header);
2117
2117
  this.selected_records.val(
2118
2118
  JSON.stringify(export_.values.records == 'selected'));
2119
+ this.selected_records.change();
2119
2120
  },
2120
2121
  _traverse: function(fields, prefix, parents, i) {
2121
2122
  var field, item;