tryton-sao 6.0.54 → 6.0.56

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 6.0.56 - 2025-03-15
3
+ ---------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
7
+ Version 6.0.55 - 2025-03-04
8
+ ---------------------------
9
+ * Bug fixes (see mercurial logs for details)
10
+
11
+
2
12
  Version 6.0.54 - 2025-02-16
3
13
  ---------------------------
4
14
  * Bug fixes (see mercurial logs for details)
package/COPYRIGHT CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (C) 2012-2024 Nicolas Évrard.
1
+ Copyright (C) 2012-2025 Nicolas Évrard.
2
2
  Copyright (C) 2012-2025 Cédric Krier.
3
3
  Copyright (C) 2012-2014 Bertrand Chenal.
4
4
  Copyright (C) 2012-2025 B2CK SPRL.
@@ -1308,7 +1308,9 @@ var Sao = {};
1308
1308
  }
1309
1309
  } else {
1310
1310
  Sao.common.error.run(data.error[0], data.error[1])
1311
- .always(dfd.reject);
1311
+ .always(function() {
1312
+ dfd.reject(data.error);
1313
+ });
1312
1314
  }
1313
1315
  } else {
1314
1316
  result = data.result;
@@ -10801,7 +10803,7 @@ var Sao = {};
10801
10803
  this.screen.save_tree_state();
10802
10804
  }
10803
10805
  var access = Sao.common.MODELACCESS.get(this.screen.model_name);
10804
- if (!(access.write || access.create)) {
10806
+ if (this.screen.readonly || !(access.write || access.create)) {
10805
10807
  return jQuery.Deferred().reject();
10806
10808
  }
10807
10809
  return this.screen.save_current().then(
@@ -10877,7 +10879,8 @@ var Sao = {};
10877
10879
  }.bind(this));
10878
10880
  },
10879
10881
  delete_: function() {
10880
- if (!Sao.common.MODELACCESS.get(this.screen.model_name)['delete']) {
10882
+ if (!Sao.common.MODELACCESS.get(this.screen.model_name)['delete']
10883
+ || !this.screen.deletable) {
10881
10884
  return jQuery.when();
10882
10885
  }
10883
10886
  var msg;
@@ -13239,6 +13242,7 @@ var Sao = {};
13239
13242
  },
13240
13243
  save_current: function() {
13241
13244
  var current_record = this.current_record;
13245
+ let new_record = current_record.id < 0;
13242
13246
  if (!current_record) {
13243
13247
  if (this.current_view &&
13244
13248
  (this.current_view.view_type == 'tree') &&
@@ -13282,6 +13286,9 @@ var Sao = {};
13282
13286
  path.splice(-1, 1,
13283
13287
  [path[path.length - 1][0], current_record.id]);
13284
13288
  }
13289
+ if (new_record && this.switch_callback) {
13290
+ this.switch_callback();
13291
+ }
13285
13292
  return this.group.get_by_path(path).then(function(record) {
13286
13293
  this.current_record = record;
13287
13294
  }.bind(this));
@@ -25820,7 +25827,10 @@ function eval_pyson(value){
25820
25827
  }
25821
25828
  this.__processing = false;
25822
25829
  }.bind(this), function(result) {
25823
- // TODO end for server error.
25830
+ if (!result || !this.screen) {
25831
+ this.state = this.end_state;
25832
+ this.end();
25833
+ }
25824
25834
  this.__processing = false;
25825
25835
  }.bind(this));
25826
25836
  };