tryton-sao 7.0.17 → 7.0.18

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.0.18 - 2024-10-05
3
+ ---------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
2
7
  Version 7.0.17 - 2024-09-16
3
8
  ---------------------------
4
9
  * Bug fixes (see mercurial logs for details)
@@ -3,7 +3,7 @@
3
3
 
4
4
  /* eslint-disable no-redeclare */
5
5
  var Sao = {
6
- __version__: '7.0.17',
6
+ __version__: '7.0.18',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
@@ -8154,12 +8154,16 @@ var Sao = {
8154
8154
  }
8155
8155
  return prm;
8156
8156
  },
8157
- reload: function(fields) {
8157
+ reload: function(fields, async=true) {
8158
8158
  if (this.id < 0) {
8159
- return jQuery.when();
8159
+ return async? jQuery.when() : null;
8160
8160
  }
8161
8161
  if (!fields) {
8162
- return this.load('*');
8162
+ return this.load('*', async);
8163
+ } else if (!async) {
8164
+ for (let field of fields) {
8165
+ this.load(field, async);
8166
+ }
8163
8167
  } else {
8164
8168
  var prms = fields.map(field => this.load(field));
8165
8169
  return jQuery.when.apply(jQuery, prms);
@@ -8868,6 +8872,7 @@ var Sao = {
8868
8872
  return result;
8869
8873
  };
8870
8874
  if (sync) {
8875
+ this._check_load(fields, false);
8871
8876
  return validate_fields();
8872
8877
  } else {
8873
8878
  return this._check_load(fields).then(validate_fields);
@@ -8891,9 +8896,9 @@ var Sao = {
8891
8896
  this.links_counts = {};
8892
8897
  this.exception = false;
8893
8898
  },
8894
- _check_load: function(fields) {
8899
+ _check_load: function(fields, async=true) {
8895
8900
  if (!this.get_loaded(fields)) {
8896
- return this.reload(fields);
8901
+ return this.reload(fields, async);
8897
8902
  }
8898
8903
  return jQuery.when();
8899
8904
  },