tryton-sao 6.6.3 → 6.6.4

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,7 @@
1
+ Version 6.6.4 - 2023-02-05
2
+ --------------------------
3
+ * Bug fixes (see mercurial logs for details)
4
+
1
5
  Version 6.6.3 - 2023-01-15
2
6
  --------------------------
3
7
  * Bug fixes (see mercurial logs for details)
@@ -1,7 +1,7 @@
1
1
  /* This file is part of Tryton. The COPYRIGHT file at the top level of
2
2
  this repository contains the full copyright notices and license terms. */
3
3
  var Sao = {
4
- __version__: '6.6.3',
4
+ __version__: '6.6.4',
5
5
  };
6
6
 
7
7
  (function() {
@@ -8915,13 +8915,13 @@ var Sao = {
8915
8915
  var previous_value = this.get(record);
8916
8916
  this.set(record, value);
8917
8917
  if (this._has_changed(previous_value, this.get(record))) {
8918
+ record.set_modified(this.name);
8918
8919
  this.changed(record);
8919
8920
  record.validate(null, true, false, true);
8920
- record.set_modified(this.name);
8921
8921
  } else if (force_change) {
8922
+ this.set_modified();
8922
8923
  this.changed(record);
8923
8924
  record.validate(null, true, false, true);
8924
- this.set_modified();
8925
8925
  }
8926
8926
  },
8927
8927
  get_client: function(record) {
@@ -9658,13 +9658,13 @@ var Sao = {
9658
9658
  previous_ids.sort(), value.sort());
9659
9659
  this._set_value(record, value, false, modified);
9660
9660
  if (modified) {
9661
+ record.set_modified(this.name);
9661
9662
  this.changed(record);
9662
9663
  record.validate(null, true, false, true);
9663
- record.set_modified(this.name);
9664
9664
  } else if (force_change) {
9665
+ record.set_modified();
9665
9666
  this.changed(record);
9666
9667
  record.validate(null, true, false, true);
9667
- record.set_modified();
9668
9668
  }
9669
9669
  },
9670
9670
  get_client: function(record) {
@@ -11736,6 +11736,7 @@ var Sao = {
11736
11736
  },
11737
11737
  record_modified: function() {
11738
11738
  this.activate_save();
11739
+ this.info_bar.refresh();
11739
11740
  },
11740
11741
  record_saved: function() {
11741
11742
  this.activate_save();
@@ -13207,6 +13208,9 @@ var Sao = {
13207
13208
  return this.__current_record;
13208
13209
  },
13209
13210
  set current_record(record) {
13211
+ if (this.__current_record === record) {
13212
+ return;
13213
+ }
13210
13214
  this.__current_record = record;
13211
13215
  var pos = null;
13212
13216
  var record_id = null;
@@ -15637,7 +15641,9 @@ function eval_pyson(value){
15637
15641
  window.setTimeout(() => {
15638
15642
  var value = this.get_value();
15639
15643
  window.setTimeout(() => {
15640
- if (this.record && (this.get_value() == value)) {
15644
+ if (this.record &&
15645
+ (this.get_value() == value) &&
15646
+ this.modified) {
15641
15647
  this.view.screen.record_modified(false);
15642
15648
  }
15643
15649
  }, 300);
@@ -17574,6 +17580,7 @@ function eval_pyson(value){
17574
17580
  row_activate: this.activate.bind(this),
17575
17581
  exclude_field: attributes.relation_field || null,
17576
17582
  limit: null,
17583
+ context: this.view.screen.context,
17577
17584
  pre_validate: attributes.pre_validate,
17578
17585
  breadcrumb: breadcrumb,
17579
17586
  });
@@ -18147,6 +18154,7 @@ function eval_pyson(value){
18147
18154
  row_activate: this.activate.bind(this),
18148
18155
  readonly: true,
18149
18156
  limit: null,
18157
+ context: this.view.screen.context,
18150
18158
  breadcrumb: breadcrumb,
18151
18159
  });
18152
18160
  this.screen.windows.push(this);
@@ -18311,12 +18319,16 @@ function eval_pyson(value){
18311
18319
  // Remove the first tree view as mode is form only
18312
18320
  view_ids.shift();
18313
18321
  }
18314
- return new Sao.Screen(this.attributes.relation, {
18322
+ var model = this.attributes.relation;
18323
+ var breadcrumb = jQuery.extend([], this.view.screen.breadcrumb);
18324
+ breadcrumb.push(this.attributes.string || Sao.common.MODELNAME.get(model));
18325
+ return new Sao.Screen(model, {
18315
18326
  'domain': domain,
18316
18327
  'view_ids': view_ids,
18317
18328
  'mode': ['form'],
18318
18329
  'views_preload': this.attributes.views,
18319
- 'context': context
18330
+ 'context': context,
18331
+ 'breadcrumb': breadcrumb,
18320
18332
  });
18321
18333
  },
18322
18334
  edit: function() {
@@ -24336,6 +24348,7 @@ function eval_pyson(value){
24336
24348
  },
24337
24349
  record_modified: function() {
24338
24350
  this.activate_save();
24351
+ this.info_bar.refresh();
24339
24352
  },
24340
24353
  activate_save: function() {
24341
24354
  if (this.but_ok.hasClass('disabled') && this.screen.modified()) {
@@ -26518,8 +26531,9 @@ function eval_pyson(value){
26518
26531
  this.states[definition.state] = button;
26519
26532
  return button;
26520
26533
  },
26521
- record_message: function() {
26534
+ record_modified: function() {
26522
26535
  this.update_buttons();
26536
+ this.info_bar.refresh();
26523
26537
  },
26524
26538
  update_buttons: function() {
26525
26539
  var record = this.screen.current_record;