tryton-sao 6.4.9 → 6.4.11

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,3 +1,11 @@
1
+ Version 6.4.11 - 2023-02-05
2
+ ---------------------------
3
+ * Bug fixes (see mercurial logs for details)
4
+
5
+ Version 6.4.10 - 2023-01-15
6
+ ---------------------------
7
+ * Bug fixes (see mercurial logs for details)
8
+
1
9
  Version 6.4.9 - 2023-01-02
2
10
  --------------------------
3
11
  * Bug fixes (see mercurial logs for details)
package/COPYRIGHT CHANGED
@@ -1,7 +1,7 @@
1
1
  Copyright (C) 2012-2022 Nicolas Évrard.
2
- Copyright (C) 2012-2022 Cédric Krier.
2
+ Copyright (C) 2012-2023 Cédric Krier.
3
3
  Copyright (C) 2012-2014 Bertrand Chenal.
4
- Copyright (C) 2012-2022 B2CK SPRL.
4
+ Copyright (C) 2012-2023 B2CK SPRL.
5
5
  Copyright (C) 2019 Jitbit.
6
6
  Copyright (C) 2013 Thomas Park
7
7
  Copyright (C) 2020-2021 Maxime Richez
@@ -8703,13 +8703,13 @@ var Sao = {};
8703
8703
  var previous_value = this.get(record);
8704
8704
  this.set(record, value);
8705
8705
  if (this._has_changed(previous_value, this.get(record))) {
8706
+ record.set_modified(this.name);
8706
8707
  this.changed(record);
8707
8708
  record.validate(null, true, false, true);
8708
- record.set_modified(this.name);
8709
8709
  } else if (force_change) {
8710
+ this.set_modified();
8710
8711
  this.changed(record);
8711
8712
  record.validate(null, true, false, true);
8712
- this.set_modified();
8713
8713
  }
8714
8714
  },
8715
8715
  get_client: function(record) {
@@ -9431,13 +9431,13 @@ var Sao = {};
9431
9431
  previous_ids.sort(), value.sort());
9432
9432
  this._set_value(record, value, false, modified);
9433
9433
  if (modified) {
9434
+ record.set_modified(this.name);
9434
9435
  this.changed(record);
9435
9436
  record.validate(null, true, false, true);
9436
- record.set_modified(this.name);
9437
9437
  } else if (force_change) {
9438
+ record.set_modified();
9438
9439
  this.changed(record);
9439
9440
  record.validate(null, true, false, true);
9440
- record.set_modified();
9441
9441
  }
9442
9442
  },
9443
9443
  get_client: function(record) {
@@ -11509,6 +11509,7 @@ var Sao = {};
11509
11509
  },
11510
11510
  record_modified: function() {
11511
11511
  this.activate_save();
11512
+ this.info_bar.refresh();
11512
11513
  },
11513
11514
  record_saved: function() {
11514
11515
  this.activate_save();
@@ -12980,6 +12981,9 @@ var Sao = {};
12980
12981
  return this.__current_record;
12981
12982
  },
12982
12983
  set current_record(record) {
12984
+ if (this.__current_record === record) {
12985
+ return;
12986
+ }
12983
12987
  this.__current_record = record;
12984
12988
  var pos = null;
12985
12989
  var record_id = null;
@@ -13445,7 +13449,8 @@ var Sao = {};
13445
13449
  for (var name in fields) {
13446
13450
  var props = fields[name];
13447
13451
  if ((props.type != 'selection') &&
13448
- (props.type != 'reference')) {
13452
+ (props.type != 'multiselection') &&
13453
+ (props.type != 'reference')) {
13449
13454
  continue;
13450
13455
  }
13451
13456
  if (props.selection instanceof Array) {
@@ -15405,7 +15410,9 @@ function eval_pyson(value){
15405
15410
  window.setTimeout(() => {
15406
15411
  var value = this.get_value();
15407
15412
  window.setTimeout(() => {
15408
- if (this.record && (this.get_value() == value)) {
15413
+ if (this.record &&
15414
+ (this.get_value() == value) &&
15415
+ this.modified) {
15409
15416
  this.view.screen.record_modified(false);
15410
15417
  }
15411
15418
  }, 300);
@@ -17342,6 +17349,7 @@ function eval_pyson(value){
17342
17349
  row_activate: this.activate.bind(this),
17343
17350
  exclude_field: attributes.relation_field || null,
17344
17351
  limit: null,
17352
+ context: this.view.screen.context,
17345
17353
  pre_validate: attributes.pre_validate,
17346
17354
  breadcrumb: breadcrumb,
17347
17355
  });
@@ -17915,6 +17923,7 @@ function eval_pyson(value){
17915
17923
  row_activate: this.activate.bind(this),
17916
17924
  readonly: true,
17917
17925
  limit: null,
17926
+ context: this.view.screen.context,
17918
17927
  breadcrumb: breadcrumb,
17919
17928
  });
17920
17929
  this.screen.windows.push(this);
@@ -18079,12 +18088,16 @@ function eval_pyson(value){
18079
18088
  // Remove the first tree view as mode is form only
18080
18089
  view_ids.shift();
18081
18090
  }
18082
- return new Sao.Screen(this.attributes.relation, {
18091
+ var model = this.attributes.relation;
18092
+ var breadcrumb = jQuery.extend([], this.view.screen.breadcrumb);
18093
+ breadcrumb.push(this.attributes.string || Sao.common.MODELNAME.get(model));
18094
+ return new Sao.Screen(model, {
18083
18095
  'domain': domain,
18084
18096
  'view_ids': view_ids,
18085
18097
  'mode': ['form'],
18086
18098
  'views_preload': this.attributes.views,
18087
- 'context': context
18099
+ 'context': context,
18100
+ 'breadcrumb': breadcrumb,
18088
18101
  });
18089
18102
  },
18090
18103
  edit: function() {
@@ -24100,6 +24113,7 @@ function eval_pyson(value){
24100
24113
  },
24101
24114
  record_modified: function() {
24102
24115
  this.activate_save();
24116
+ this.info_bar.refresh();
24103
24117
  },
24104
24118
  activate_save: function() {
24105
24119
  if (this.but_ok.hasClass('disabled') && this.screen.modified()) {
@@ -26281,8 +26295,9 @@ function eval_pyson(value){
26281
26295
  this.states[definition.state] = button;
26282
26296
  return button;
26283
26297
  },
26284
- record_message: function() {
26298
+ record_modified: function() {
26285
26299
  this.update_buttons();
26300
+ this.info_bar.refresh();
26286
26301
  },
26287
26302
  update_buttons: function() {
26288
26303
  var record = this.screen.current_record;