tryton-sao 6.0.32 → 6.0.34

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.34 - 2023-12-16
3
+ ---------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
7
+ Version 6.0.33 - 2023-12-01
8
+ ---------------------------
9
+ * Bug fixes (see mercurial logs for details)
10
+
11
+
2
12
  Version 6.0.32 - 2023-11-03
3
13
  ---------------------------
4
14
  * Bug fixes (see mercurial logs for details)
@@ -9714,12 +9714,13 @@ img.icon {
9714
9714
  }
9715
9715
  .treeview .expander > img {
9716
9716
  float: left;
9717
- margin-right: 5px;
9718
- width: 1em;
9717
+ margin-right: 1em;
9718
+ width: 1.42857143em;
9719
+ height: 1.42857143em;
9719
9720
  }
9720
9721
  [dir="rtl"] .treeview .expander > img {
9721
9722
  float: right;
9722
- margin-left: 5px;
9723
+ margin-left: 1em;
9723
9724
  }
9724
9725
  .treeview label {
9725
9726
  font-weight: normal;
@@ -716,11 +716,14 @@ var Sao = {};
716
716
 
717
717
  Sao.main_menu_row_activate = function() {
718
718
  var screen = Sao.main_menu_screen;
719
- // ids is not defined to prevent to add suffix
720
- return Sao.Action.exec_keyword('tree_open', {
721
- 'model': screen.model_name,
722
- 'id': screen.get_id(),
723
- }, null, false);
719
+ var id = screen.get_id();
720
+ if (id) {
721
+ // ids is not defined to prevent to add suffix
722
+ Sao.Action.exec_keyword('tree_open', {
723
+ 'model': screen.model_name,
724
+ 'id': screen.get_id(),
725
+ }, null, false);
726
+ }
724
727
  };
725
728
 
726
729
  Sao.menu = function(preferences) {
@@ -3025,12 +3028,14 @@ var Sao = {};
3025
3028
 
3026
3029
  Sao.common.scrollIntoViewIfNeeded = function(element) {
3027
3030
  element = element[0];
3028
- var rect = element.getBoundingClientRect();
3029
- if (rect.bottom > window.innerHeight) {
3030
- element.scrollIntoView(false);
3031
- }
3032
- if (rect.top < 0) {
3033
- element.scrollIntoView();
3031
+ if (element) {
3032
+ var rect = element.getBoundingClientRect();
3033
+ if (rect.bottom > window.innerHeight) {
3034
+ element.scrollIntoView(false);
3035
+ }
3036
+ if (rect.top < 0) {
3037
+ element.scrollIntoView();
3038
+ }
3034
3039
  }
3035
3040
  };
3036
3041
 
@@ -7963,6 +7968,7 @@ var Sao = {};
7963
7968
  }
7964
7969
  if (this.model.fields[name] instanceof Sao.field.One2Many) {
7965
7970
  later[name] = value;
7971
+ continue;
7966
7972
  }
7967
7973
  if ((this.model.fields[name] instanceof Sao.field.Many2One) ||
7968
7974
  (this.model.fields[name] instanceof Sao.field.Reference)) {
@@ -7977,6 +7983,7 @@ var Sao = {};
7977
7983
  value = later[name];
7978
7984
  this.model.fields[name].set(this, value);
7979
7985
  this._loaded[name] = true;
7986
+ fieldnames.push(name);
7980
7987
  }
7981
7988
  if (validate) {
7982
7989
  this.validate(fieldnames, true, false, false);
@@ -13065,11 +13072,14 @@ var Sao = {};
13065
13072
  default_row_activate: function() {
13066
13073
  if ((this.current_view.view_type == 'tree') &&
13067
13074
  (this.current_view.attributes.keyword_open == 1)) {
13068
- Sao.Action.exec_keyword('tree_open', {
13069
- 'model': this.model_name,
13070
- 'id': this.get_id(),
13071
- 'ids': [this.get_id()]
13072
- }, this.local_context, false);
13075
+ var id = this.get_id();
13076
+ if (id) {
13077
+ Sao.Action.exec_keyword('tree_open', {
13078
+ 'model': this.model_name,
13079
+ 'id': this.get_id(),
13080
+ 'ids': [this.get_id()]
13081
+ }, this.local_context, false);
13082
+ }
13073
13083
  } else {
13074
13084
  if (!this.modified()) {
13075
13085
  this.switch_view('form');
@@ -14868,7 +14878,7 @@ function eval_pyson(value){
14868
14878
  hide: function() {
14869
14879
  Sao.View.Form.Page._super.hide.call(this);
14870
14880
  if (this.el.hasClass('active')) {
14871
- this.el.next(':visible').find('a').tab('show');
14881
+ this.el.siblings(':visible').first().find('a').tab('show');
14872
14882
  }
14873
14883
  }
14874
14884
  });
@@ -20577,6 +20587,11 @@ function eval_pyson(value){
20577
20587
  this.expander.children().html('&nbsp;');
20578
20588
  this.expander.on('click keypress',
20579
20589
  Sao.common.click_press(this.toggle_row.bind(this)));
20590
+ this.expander.dblclick(function (evt) {
20591
+ // prevent calling switch_row on td
20592
+ evt.preventDefault();
20593
+ evt.stopImmediatePropagation();
20594
+ });
20580
20595
  }
20581
20596
 
20582
20597
  for (var i = 0; i < this.tree.columns.length; i++) {
@@ -9714,12 +9714,13 @@ img.icon {
9714
9714
  }
9715
9715
  .treeview .expander > img {
9716
9716
  float: left;
9717
- margin-right: 5px;
9718
- width: 1em;
9717
+ margin-right: 1em;
9718
+ width: 1.42857143em;
9719
+ height: 1.42857143em;
9719
9720
  }
9720
9721
  [dir="rtl"] .treeview .expander > img {
9721
9722
  float: right;
9722
- margin-left: 5px;
9723
+ margin-left: 1em;
9723
9724
  }
9724
9725
  .treeview label {
9725
9726
  font-weight: normal;