tryton-sao 6.8.4 → 6.8.5

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,9 @@
1
1
 
2
+ Version 6.8.5 - 2023-12-01
3
+ --------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
2
7
  Version 6.8.4 - 2023-11-03
3
8
  --------------------------
4
9
  * Bug fixes (see mercurial logs for details)
@@ -9598,16 +9598,15 @@ img.icon {
9598
9598
  .treeview > table.tree col.optional {
9599
9599
  width: 30px;
9600
9600
  }
9601
- .treeview > table.tree td.draggable-handle,
9602
- .treeview > table.tree td.optional {
9603
- cursor: grab;
9604
- }
9605
9601
  .treeview > table.tree td.draggable-handle > img,
9606
9602
  .treeview > table.tree td.optional > img {
9607
9603
  display: block;
9608
9604
  margin-right: auto;
9609
9605
  margin-left: auto;
9610
9606
  }
9607
+ .treeview > table.tree td.draggable-handle {
9608
+ cursor: grab;
9609
+ }
9611
9610
  .treeview > table.tree th.selection-state > input,
9612
9611
  .treeview > table.tree td.selection-state > input {
9613
9612
  display: block;
@@ -9788,12 +9787,13 @@ img.icon {
9788
9787
  }
9789
9788
  .treeview .expander > img {
9790
9789
  float: left;
9791
- margin-right: 5px;
9792
- width: 1em;
9790
+ margin-right: 1em;
9791
+ width: 1.42857143em;
9792
+ height: 1.42857143em;
9793
9793
  }
9794
9794
  [dir="rtl"] .treeview .expander > img {
9795
9795
  float: right;
9796
- margin-left: 5px;
9796
+ margin-left: 1em;
9797
9797
  }
9798
9798
  .treeview label {
9799
9799
  font-weight: normal;
@@ -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.8.4',
4
+ __version__: '6.8.5',
5
5
  };
6
6
 
7
7
  (function() {
@@ -778,11 +778,14 @@ var Sao = {
778
778
 
779
779
  Sao.main_menu_row_activate = function() {
780
780
  var screen = Sao.main_menu_screen;
781
- // ids is not defined to prevent to add suffix
782
- return Sao.Action.exec_keyword('tree_open', {
783
- 'model': screen.model_name,
784
- 'id': screen.get_id(),
785
- }, null, false);
781
+ const id = screen.get_id();
782
+ if (id) {
783
+ // ids is not defined to prevent to add suffix
784
+ Sao.Action.exec_keyword('tree_open', {
785
+ 'model': screen.model_name,
786
+ 'id': screen.get_id(),
787
+ }, null, false);
788
+ }
786
789
  };
787
790
 
788
791
  Sao.menu = function(preferences) {
@@ -824,6 +827,7 @@ var Sao = {
824
827
  view.table.removeClass('table table-bordered');
825
828
  view.table.addClass('no-responsive');
826
829
  view.table.find('thead').hide();
830
+ view.table.find('colgroup > col.tree-menu').css('width', 0);
827
831
  var gs = new Sao.GlobalSearch();
828
832
  jQuery('#global-search').empty();
829
833
  jQuery('#global-search').append(gs.el);
@@ -2731,7 +2735,7 @@ var Sao = {
2731
2735
  'sao_device_cookies', JSON.stringify(device_cookies));
2732
2736
  });
2733
2737
  renew_prm.fail(() => {
2734
- Sao.error("Cannot renew device cookie");
2738
+ Sao.Logger.error("Cannot renew device cookie");
2735
2739
  });
2736
2740
  }
2737
2741
  });
@@ -6290,7 +6294,7 @@ var Sao = {
6290
6294
  return img_url;
6291
6295
  })
6292
6296
  .fail(() => {
6293
- Sao.error("Unknown icon %s", icon_name);
6297
+ Sao.Logger.error("Unknown icon %s", icon_name);
6294
6298
  });
6295
6299
  }
6296
6300
  });
@@ -13467,11 +13471,14 @@ var Sao = {
13467
13471
  default_row_activate: function() {
13468
13472
  if ((this.current_view.view_type == 'tree') &&
13469
13473
  (this.current_view.attributes.keyword_open == 1)) {
13470
- Sao.Action.exec_keyword('tree_open', {
13471
- 'model': this.model_name,
13472
- 'id': this.get_id(),
13473
- 'ids': [this.get_id()]
13474
- }, this.local_context, false);
13474
+ const id = this.get_id();
13475
+ if (id) {
13476
+ Sao.Action.exec_keyword('tree_open', {
13477
+ 'model': this.model_name,
13478
+ 'id': this.get_id(),
13479
+ 'ids': [this.get_id()]
13480
+ }, this.local_context, false);
13481
+ }
13475
13482
  } else {
13476
13483
  if (!this.modified()) {
13477
13484
  this.switch_view('form');
@@ -15297,7 +15304,7 @@ function eval_pyson(value){
15297
15304
  hide: function() {
15298
15305
  Sao.View.Form.Page._super.hide.call(this);
15299
15306
  if (this.el.hasClass('active')) {
15300
- this.el.next(':visible').find('a').tab('show');
15307
+ this.el.siblings(':visible').first().find('a').tab('show');
15301
15308
  }
15302
15309
  }
15303
15310
  });
@@ -21349,6 +21356,11 @@ function eval_pyson(value){
21349
21356
  this.expander.children().html(' ');
21350
21357
  this.expander.on('click keypress',
21351
21358
  Sao.common.click_press(this.toggle_row.bind(this)));
21359
+ this.expander.dblclick((evt) => {
21360
+ // prevent calling switch_row on td
21361
+ evt.preventDefault();
21362
+ evt.stopImmediatePropagation();
21363
+ });
21352
21364
  }
21353
21365
 
21354
21366
  for (var i = 0; i < this.tree.columns.length; i++) {
@@ -9598,16 +9598,15 @@ img.icon {
9598
9598
  .treeview > table.tree col.optional {
9599
9599
  width: 30px;
9600
9600
  }
9601
- .treeview > table.tree td.draggable-handle,
9602
- .treeview > table.tree td.optional {
9603
- cursor: grab;
9604
- }
9605
9601
  .treeview > table.tree td.draggable-handle > img,
9606
9602
  .treeview > table.tree td.optional > img {
9607
9603
  display: block;
9608
9604
  margin-right: auto;
9609
9605
  margin-left: auto;
9610
9606
  }
9607
+ .treeview > table.tree td.draggable-handle {
9608
+ cursor: grab;
9609
+ }
9611
9610
  .treeview > table.tree th.selection-state > input,
9612
9611
  .treeview > table.tree td.selection-state > input {
9613
9612
  display: block;
@@ -9788,12 +9787,13 @@ img.icon {
9788
9787
  }
9789
9788
  .treeview .expander > img {
9790
9789
  float: left;
9791
- margin-right: 5px;
9792
- width: 1em;
9790
+ margin-right: 1em;
9791
+ width: 1.42857143em;
9792
+ height: 1.42857143em;
9793
9793
  }
9794
9794
  [dir="rtl"] .treeview .expander > img {
9795
9795
  float: right;
9796
- margin-left: 5px;
9796
+ margin-left: 1em;
9797
9797
  }
9798
9798
  .treeview label {
9799
9799
  font-weight: normal;