tryton-sao 7.0.13 → 7.0.14

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 7.0.14 - 2024-07-17
3
+ ---------------------------
4
+ * Bug fixes (see mercurial logs for details)
5
+
6
+
2
7
  Version 7.0.13 - 2024-07-01
3
8
  ---------------------------
4
9
  * Bug fixes (see mercurial logs for details)
@@ -3,7 +3,7 @@
3
3
 
4
4
  /* eslint-disable no-redeclare */
5
5
  var Sao = {
6
- __version__: '7.0.13',
6
+ __version__: '7.0.14',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
@@ -10656,7 +10656,9 @@ var Sao = {
10656
10656
  this.menu_buttons[item.id] = menuitem;
10657
10657
  link.click(evt => {
10658
10658
  evt.preventDefault();
10659
- this[item.id]();
10659
+ if (!menuitem.hasClass('disabled')) {
10660
+ this[item.id]();
10661
+ }
10660
10662
  });
10661
10663
  } else if (!item && previous) {
10662
10664
  menuitem = jQuery('<li/>', {
@@ -21486,7 +21488,10 @@ function eval_pyson(value){
21486
21488
  if (this.editable && new_) {
21487
21489
  td.trigger('click');
21488
21490
  }
21489
- Sao.common.find_focusable_child(td).focus();
21491
+ var child = Sao.common.find_focusable_child(td);
21492
+ if (child) {
21493
+ child.focus();
21494
+ }
21490
21495
  }
21491
21496
  }
21492
21497
  };
@@ -25474,8 +25479,14 @@ function eval_pyson(value){
25474
25479
  this.title = title;
25475
25480
  this.exclude_field = kwargs.exclude_field || null;
25476
25481
  var dialog = new Sao.Dialog(Sao.i18n.gettext(
25477
- 'Search %1', this.title), '', 'lg');
25482
+ 'Search %1', this.title), '', 'lg', false);
25478
25483
  this.el = dialog.modal;
25484
+ this.el.on('keydown', e => {
25485
+ if (e.which == Sao.common.ESC_KEYCODE) {
25486
+ e.preventDefault();
25487
+ this.response('RESPONSE_CANCEL');
25488
+ }
25489
+ });
25479
25490
 
25480
25491
  jQuery('<button/>', {
25481
25492
  'class': 'btn btn-link',
@@ -25551,7 +25562,8 @@ function eval_pyson(value){
25551
25562
  if (response_id == 'RESPONSE_OK') {
25552
25563
  records = this.screen.current_view.selected_records;
25553
25564
  } else if (response_id == 'RESPONSE_APPLY') {
25554
- this.screen.search_filter();
25565
+ this.screen.search_filter(
25566
+ this.screen.screen_container.get_text());
25555
25567
  return;
25556
25568
  } else if (response_id == 'RESPONSE_ACCEPT') {
25557
25569
  var view_ids = jQuery.extend([], this.view_ids);
@@ -27619,7 +27631,8 @@ function eval_pyson(value){
27619
27631
  }
27620
27632
  if (!dialog ||
27621
27633
  !this.model ||
27622
- (Sao.main_menu_screen.model_name == this.model)) {
27634
+ (Sao.main_menu_screen &&
27635
+ (Sao.main_menu_screen.model_name == this.model))) {
27623
27636
  is_menu = true;
27624
27637
  screen = Sao.main_menu_screen;
27625
27638
  } else {