tryton-sao 6.6.2 → 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,11 @@
1
+ Version 6.6.4 - 2023-02-05
2
+ --------------------------
3
+ * Bug fixes (see mercurial logs for details)
4
+
5
+ Version 6.6.3 - 2023-01-15
6
+ --------------------------
7
+ * Bug fixes (see mercurial logs for details)
8
+
1
9
  Version 6.6.2 - 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
@@ -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.2',
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;
@@ -13672,7 +13676,8 @@ var Sao = {
13672
13676
  for (var name in fields) {
13673
13677
  var props = fields[name];
13674
13678
  if ((props.type != 'selection') &&
13675
- (props.type != 'reference')) {
13679
+ (props.type != 'multiselection') &&
13680
+ (props.type != 'reference')) {
13676
13681
  continue;
13677
13682
  }
13678
13683
  if (props.selection instanceof Array) {
@@ -15636,7 +15641,9 @@ function eval_pyson(value){
15636
15641
  window.setTimeout(() => {
15637
15642
  var value = this.get_value();
15638
15643
  window.setTimeout(() => {
15639
- if (this.record && (this.get_value() == value)) {
15644
+ if (this.record &&
15645
+ (this.get_value() == value) &&
15646
+ this.modified) {
15640
15647
  this.view.screen.record_modified(false);
15641
15648
  }
15642
15649
  }, 300);
@@ -17573,6 +17580,7 @@ function eval_pyson(value){
17573
17580
  row_activate: this.activate.bind(this),
17574
17581
  exclude_field: attributes.relation_field || null,
17575
17582
  limit: null,
17583
+ context: this.view.screen.context,
17576
17584
  pre_validate: attributes.pre_validate,
17577
17585
  breadcrumb: breadcrumb,
17578
17586
  });
@@ -18146,6 +18154,7 @@ function eval_pyson(value){
18146
18154
  row_activate: this.activate.bind(this),
18147
18155
  readonly: true,
18148
18156
  limit: null,
18157
+ context: this.view.screen.context,
18149
18158
  breadcrumb: breadcrumb,
18150
18159
  });
18151
18160
  this.screen.windows.push(this);
@@ -18310,12 +18319,16 @@ function eval_pyson(value){
18310
18319
  // Remove the first tree view as mode is form only
18311
18320
  view_ids.shift();
18312
18321
  }
18313
- 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, {
18314
18326
  'domain': domain,
18315
18327
  'view_ids': view_ids,
18316
18328
  'mode': ['form'],
18317
18329
  'views_preload': this.attributes.views,
18318
- 'context': context
18330
+ 'context': context,
18331
+ 'breadcrumb': breadcrumb,
18319
18332
  });
18320
18333
  },
18321
18334
  edit: function() {
@@ -24335,6 +24348,7 @@ function eval_pyson(value){
24335
24348
  },
24336
24349
  record_modified: function() {
24337
24350
  this.activate_save();
24351
+ this.info_bar.refresh();
24338
24352
  },
24339
24353
  activate_save: function() {
24340
24354
  if (this.but_ok.hasClass('disabled') && this.screen.modified()) {
@@ -26517,8 +26531,9 @@ function eval_pyson(value){
26517
26531
  this.states[definition.state] = button;
26518
26532
  return button;
26519
26533
  },
26520
- record_message: function() {
26534
+ record_modified: function() {
26521
26535
  this.update_buttons();
26536
+ this.info_bar.refresh();
26522
26537
  },
26523
26538
  update_buttons: function() {
26524
26539
  var record = this.screen.current_record;