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/CHANGELOG +10 -0
- package/dist/tryton-sao.css +4 -4
- package/dist/tryton-sao.js +15 -15
- package/dist/tryton-sao.min.css +4 -4
- package/dist/tryton-sao.min.js +2 -2
- package/package.json +1 -1
- package/src/model.js +1 -2
- package/src/sao.js +1 -1
- package/src/sao.less +1 -1
- package/src/screen.js +6 -9
- package/src/tab.js +1 -1
- package/src/view/form.js +5 -2
- package/src/window.js +1 -0
package/package.json
CHANGED
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
|
|
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
package/src/sao.less
CHANGED
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.
|
|
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;
|