tryton-sao 7.0.21 → 7.0.23

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "tryton-sao",
3
3
  "title": "sao",
4
4
  "description": "Tryton webclient",
5
- "version": "7.0.21",
5
+ "version": "7.0.23",
6
6
  "homepage": "http://www.tryton.org/",
7
7
  "author": {
8
8
  "name": "Tryton"
package/src/model.js CHANGED
@@ -2526,8 +2526,7 @@
2526
2526
  if (record.model.name == this.description.relation) {
2527
2527
  model = record.model;
2528
2528
  }
2529
- var context = record.expr_eval(this.description.context || {});
2530
- var group = Sao.Group(model, context, []);
2529
+ var group = Sao.Group(model, {}, []);
2531
2530
  group.set_parent(record);
2532
2531
  group.parent_name = this.description.relation_field;
2533
2532
  group.child_name = this.name;
package/src/sao.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  /* eslint-disable no-redeclare */
5
5
  var Sao = {
6
- __version__: '7.0.21',
6
+ __version__: '7.0.23',
7
7
  };
8
8
  /* eslint-enable no-redeclare */
9
9
 
package/src/sao.less CHANGED
@@ -656,7 +656,7 @@ img.icon {
656
656
  min-width: 8ch;
657
657
  }
658
658
  }
659
- .form-many2one, .form-one2one, .form-reference, form-binary {
659
+ .form-many2one, .form-one2one, .form-reference, .form-binary {
660
660
  select {
661
661
  min-width: 8ch;
662
662
  }
package/src/screen.js CHANGED
@@ -4,7 +4,8 @@
4
4
  'use strict';
5
5
 
6
6
  Sao.ScreenContainer = Sao.class_(Object, {
7
- init: function(tab_domain) {
7
+ init: function(screen, tab_domain) {
8
+ this.screen = screen;
8
9
  this.alternate_viewport = jQuery('<div/>', {
9
10
  'class': 'screen-container'
10
11
  });
@@ -391,13 +392,10 @@
391
392
  do_search: function() {
392
393
  return this.screen.search_filter(this.get_text());
393
394
  },
394
- set_screen: function(screen) {
395
- this.screen = screen;
396
- this.but_bookmark.prop('disabled',
397
- jQuery.isEmptyObject(this.bookmarks()));
398
- this.bookmark_match();
399
- },
400
395
  show_filter: function() {
396
+ this.but_bookmark.prop(
397
+ 'disabled', jQuery.isEmptyObject(this.bookmarks()));
398
+ this.bookmark_match();
401
399
  this.filter_box.show();
402
400
  if (this.tab) {
403
401
  this.tab.show();
@@ -817,7 +815,7 @@
817
815
  this.new_group(attributes.context || {});
818
816
  this.current_record = null;
819
817
  this.screen_container = new Sao.ScreenContainer(
820
- attributes.tab_domain);
818
+ this, attributes.tab_domain);
821
819
  this.breadcrumb = attributes.breadcrumb || [];
822
820
 
823
821
  this.context_screen = null;
@@ -1728,7 +1726,6 @@
1728
1726
  },
1729
1727
  search_active: function(active) {
1730
1728
  if (active && !this.group.parent) {
1731
- this.screen_container.set_screen(this);
1732
1729
  this.screen_container.show_filter();
1733
1730
  } else {
1734
1731
  this.screen_container.hide_filter();
package/src/tab.js CHANGED
@@ -1093,7 +1093,7 @@
1093
1093
  var record = this.screen.current_record;
1094
1094
  var menu = dropdown.find('.dropdown-menu');
1095
1095
  menu.empty();
1096
- Sao.Window.Attachment.get_attachments(record)
1096
+ return Sao.Window.Attachment.get_attachments(record)
1097
1097
  .then(function(attachments) {
1098
1098
  attachments.forEach(function(value) {
1099
1099
  var name = value[0],
package/src/view/form.js CHANGED
@@ -223,7 +223,6 @@ function eval_pyson(value){
223
223
  var group = new Sao.View.Form.Container(
224
224
  Number(node.getAttribute('col') || 4));
225
225
  this.view.containers.push(group);
226
- this.parse_child(node, group);
227
226
 
228
227
  if (attributes.xalign === undefined) {
229
228
  attributes.xalign = 0.5;
@@ -248,6 +247,9 @@ function eval_pyson(value){
248
247
 
249
248
  this.view.state_widgets.push(widget);
250
249
  this.container.add(widget, attributes);
250
+ // Parse the children at the end to preserve the order of the state
251
+ // widgets
252
+ this.parse_child(node, group);
251
253
  },
252
254
  _parse_hpaned: function(node, attributes) {
253
255
  this._parse_paned(node, attributes, 'horizontal');
@@ -4350,7 +4352,8 @@ function eval_pyson(value){
4350
4352
  },
4351
4353
  set_readonly: function(readonly) {
4352
4354
  Sao.View.Form.Binary._super.set_readonly.call(this, readonly);
4353
- this.but_select.prop('disabled', readonly);
4355
+ this.but_select.toggleClass('disabled', readonly);
4356
+ this.input_select.toggle(!readonly);
4354
4357
  this.but_clear.prop('disabled', readonly);
4355
4358
  if (this.text) {
4356
4359
  this.text.prop('readonly', readonly);
package/src/window.js CHANGED
@@ -2082,6 +2082,7 @@
2082
2082
  this.el_add_field_names.prop('checked', export_.values.header);
2083
2083
  this.selected_records.val(
2084
2084
  JSON.stringify(export_.values.records == 'selected'));
2085
+ this.selected_records.change();
2085
2086
  },
2086
2087
  _traverse: function(fields, prefix, parents, i) {
2087
2088
  var field, item;