tryton-sao 6.0.42 → 6.0.44
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 +8 -4
- package/dist/tryton-sao.js +43 -29
- package/dist/tryton-sao.min.css +8 -4
- package/dist/tryton-sao.min.js +2 -2
- package/package.json +1 -1
- package/src/sao.less +10 -6
- package/src/screen.js +9 -5
- package/src/tab.js +3 -1
- package/src/view/calendar.js +7 -2
- package/src/view/tree.js +11 -12
- package/src/window.js +11 -8
- package/src/wizard.js +2 -1
package/CHANGELOG
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
|
|
2
|
+
Version 6.0.44 - 2024-07-17
|
|
3
|
+
---------------------------
|
|
4
|
+
* Bug fixes (see mercurial logs for details)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Version 6.0.43 - 2024-07-01
|
|
8
|
+
---------------------------
|
|
9
|
+
* Bug fixes (see mercurial logs for details)
|
|
10
|
+
|
|
11
|
+
|
|
2
12
|
Version 6.0.42 - 2024-06-15
|
|
3
13
|
---------------------------
|
|
4
14
|
* Bug fixes (see mercurial logs for details)
|
package/dist/tryton-sao.css
CHANGED
|
@@ -9882,10 +9882,14 @@ img.icon {
|
|
|
9882
9882
|
min-height: 150px;
|
|
9883
9883
|
max-height: 300px;
|
|
9884
9884
|
}
|
|
9885
|
-
.form .form-text
|
|
9886
|
-
.form .form-richtext
|
|
9887
|
-
|
|
9888
|
-
|
|
9885
|
+
.form .form-text .input-group,
|
|
9886
|
+
.form .form-richtext .input-group {
|
|
9887
|
+
width: 100%;
|
|
9888
|
+
}
|
|
9889
|
+
.form .form-text .input-group textarea,
|
|
9890
|
+
.form .form-richtext .input-group textarea,
|
|
9891
|
+
.form .form-text .input-group .richtext,
|
|
9892
|
+
.form .form-richtext .input-group .richtext {
|
|
9889
9893
|
height: 100%;
|
|
9890
9894
|
line-height: 2.5ex;
|
|
9891
9895
|
min-height: 12.5ex;
|
package/dist/tryton-sao.js
CHANGED
|
@@ -10115,7 +10115,9 @@ var Sao = {};
|
|
|
10115
10115
|
this.menu_buttons[item.id] = menuitem;
|
|
10116
10116
|
link.click(function(evt) {
|
|
10117
10117
|
evt.preventDefault();
|
|
10118
|
-
|
|
10118
|
+
if (!menuitem.hasClass('disabled')) {
|
|
10119
|
+
this[item.id]();
|
|
10120
|
+
}
|
|
10119
10121
|
}.bind(this));
|
|
10120
10122
|
} else if (!item && previous) {
|
|
10121
10123
|
menuitem = jQuery('<li/>', {
|
|
@@ -12456,9 +12458,7 @@ var Sao = {};
|
|
|
12456
12458
|
this.views = [];
|
|
12457
12459
|
this.views_preload = attributes.views_preload || {};
|
|
12458
12460
|
this.exclude_field = attributes.exclude_field;
|
|
12459
|
-
this.new_group(attributes.context || {});
|
|
12460
12461
|
this.current_view = null;
|
|
12461
|
-
this.current_record = null;
|
|
12462
12462
|
this.domain = attributes.domain || [];
|
|
12463
12463
|
this.context_domain = attributes.context_domain;
|
|
12464
12464
|
this.size_limit = null;
|
|
@@ -12469,11 +12469,14 @@ var Sao = {};
|
|
|
12469
12469
|
}
|
|
12470
12470
|
this.offset = 0;
|
|
12471
12471
|
this.order = this.default_order = attributes.order;
|
|
12472
|
+
this.readonly = this.attributes.readonly || false;
|
|
12472
12473
|
var access = Sao.common.MODELACCESS.get(model_name);
|
|
12473
12474
|
if (!(access.write || access.create)) {
|
|
12474
|
-
this.
|
|
12475
|
+
this.readonly = true;
|
|
12475
12476
|
}
|
|
12476
12477
|
this.search_count = 0;
|
|
12478
|
+
this.new_group(attributes.context || {});
|
|
12479
|
+
this.current_record = null;
|
|
12477
12480
|
this.screen_container = new Sao.ScreenContainer(
|
|
12478
12481
|
attributes.tab_domain);
|
|
12479
12482
|
this.breadcrumb = attributes.breadcrumb || [];
|
|
@@ -12523,7 +12526,10 @@ var Sao = {};
|
|
|
12523
12526
|
var readonly_records = this.selected_records.some(function(r) {
|
|
12524
12527
|
return r.readonly;
|
|
12525
12528
|
});
|
|
12526
|
-
return this.
|
|
12529
|
+
return this.__readonly || readonly_records;
|
|
12530
|
+
},
|
|
12531
|
+
set readonly(value) {
|
|
12532
|
+
this.__readonly = value;
|
|
12527
12533
|
},
|
|
12528
12534
|
get deletable() {
|
|
12529
12535
|
return this.selected_records.every(function(r) {
|
|
@@ -12906,7 +12912,7 @@ var Sao = {};
|
|
|
12906
12912
|
context = this.context;
|
|
12907
12913
|
}
|
|
12908
12914
|
var group = new Sao.Group(this.model, context, []);
|
|
12909
|
-
group.readonly = this.
|
|
12915
|
+
group.readonly = this.__readonly;
|
|
12910
12916
|
this.set_group(group);
|
|
12911
12917
|
},
|
|
12912
12918
|
get current_record() {
|
|
@@ -19874,7 +19880,7 @@ function eval_pyson(value){
|
|
|
19874
19880
|
|
|
19875
19881
|
var tbody = this.tbody;
|
|
19876
19882
|
var current_record = this.record;
|
|
19877
|
-
if (jQuery.isEmptyObject(selected)) {
|
|
19883
|
+
if (jQuery.isEmptyObject(selected) && current_record) {
|
|
19878
19884
|
selected = this.get_selected_paths();
|
|
19879
19885
|
if (this.selection.prop('checked') &&
|
|
19880
19886
|
!this.selection.prop('indeterminate')) {
|
|
@@ -19884,16 +19890,12 @@ function eval_pyson(value){
|
|
|
19884
19890
|
selected.push([record.id]);
|
|
19885
19891
|
});
|
|
19886
19892
|
} else {
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
|
|
19893
|
-
selected = [current_path];
|
|
19894
|
-
}
|
|
19895
|
-
} else if (!current_record) {
|
|
19896
|
-
selected = [];
|
|
19893
|
+
var current_path = current_record.get_path(this.group);
|
|
19894
|
+
current_path = current_path.map(function(e) {
|
|
19895
|
+
return e[1];
|
|
19896
|
+
});
|
|
19897
|
+
if (!Sao.common.contains(selected, current_path)) {
|
|
19898
|
+
selected = [current_path];
|
|
19897
19899
|
}
|
|
19898
19900
|
}
|
|
19899
19901
|
}
|
|
@@ -20459,7 +20461,10 @@ function eval_pyson(value){
|
|
|
20459
20461
|
if (this.editable && new_) {
|
|
20460
20462
|
td.trigger('click');
|
|
20461
20463
|
}
|
|
20462
|
-
|
|
20464
|
+
var child = Sao.common.find_focusable_child(td);
|
|
20465
|
+
if (child) {
|
|
20466
|
+
child.focus();
|
|
20467
|
+
}
|
|
20463
20468
|
}
|
|
20464
20469
|
}
|
|
20465
20470
|
}.bind(this);
|
|
@@ -22869,13 +22874,18 @@ function eval_pyson(value){
|
|
|
22869
22874
|
var last_datetime = Sao.DateTime(this.end);
|
|
22870
22875
|
var dtstart = this.attributes.dtstart;
|
|
22871
22876
|
var dtend = this.attributes.dtend || dtstart;
|
|
22872
|
-
return [
|
|
22877
|
+
return [
|
|
22878
|
+
[dtstart, '!=', null],
|
|
22879
|
+
[dtend, '!=', null],
|
|
22880
|
+
['OR',
|
|
22873
22881
|
['AND', [dtstart, '>=', first_datetime],
|
|
22874
22882
|
[dtstart, '<', last_datetime]],
|
|
22875
22883
|
['AND', [dtend, '>=', first_datetime],
|
|
22876
22884
|
[dtend, '<', last_datetime]],
|
|
22877
22885
|
['AND', [dtstart, '<', first_datetime],
|
|
22878
|
-
[dtend, '>', last_datetime]]
|
|
22886
|
+
[dtend, '>', last_datetime]],
|
|
22887
|
+
],
|
|
22888
|
+
];
|
|
22879
22889
|
},
|
|
22880
22890
|
get_displayed_period: function(){
|
|
22881
22891
|
var DatesPeriod = [];
|
|
@@ -23452,7 +23462,7 @@ function eval_pyson(value){
|
|
|
23452
23462
|
}
|
|
23453
23463
|
}.bind(this));
|
|
23454
23464
|
|
|
23455
|
-
var readonly = this.screen.
|
|
23465
|
+
var readonly = this.screen.group.readonly;
|
|
23456
23466
|
|
|
23457
23467
|
this._initial_value = null;
|
|
23458
23468
|
if (view_type == 'form') {
|
|
@@ -23645,7 +23655,7 @@ function eval_pyson(value){
|
|
|
23645
23655
|
var name = '_';
|
|
23646
23656
|
var access = Sao.common.MODELACCESS.get(this.screen.model_name);
|
|
23647
23657
|
var deletable = this.screen.deletable;
|
|
23648
|
-
var readonly = this.screen.
|
|
23658
|
+
var readonly = this.screen.group.readonly;
|
|
23649
23659
|
if (data[0] >= 1) {
|
|
23650
23660
|
name = data[0];
|
|
23651
23661
|
if (this.domain) {
|
|
@@ -23653,10 +23663,12 @@ function eval_pyson(value){
|
|
|
23653
23663
|
}
|
|
23654
23664
|
this.but_next.prop('disabled', data[0] >= data[1]);
|
|
23655
23665
|
this.but_previous.prop('disabled', data[0] <= 1);
|
|
23656
|
-
|
|
23657
|
-
|
|
23658
|
-
|
|
23659
|
-
|
|
23666
|
+
this.but_del.prop(
|
|
23667
|
+
'disabled',
|
|
23668
|
+
readonly ||
|
|
23669
|
+
!access.delete ||
|
|
23670
|
+
!deletable);
|
|
23671
|
+
this.but_undel.prop('disabled', readonly);
|
|
23660
23672
|
} else {
|
|
23661
23673
|
this.but_del.prop('disabled', true);
|
|
23662
23674
|
this.but_undel.prop('disabled', true);
|
|
@@ -23722,7 +23734,7 @@ function eval_pyson(value){
|
|
|
23722
23734
|
response: function(response_id) {
|
|
23723
23735
|
var result;
|
|
23724
23736
|
this.screen.current_view.set_value();
|
|
23725
|
-
var readonly = this.screen.
|
|
23737
|
+
var readonly = this.screen.group.readonly;
|
|
23726
23738
|
if (~['RESPONSE_OK', 'RESPONSE_ACCEPT'].indexOf(response_id) &&
|
|
23727
23739
|
!readonly &&
|
|
23728
23740
|
this.screen.current_record) {
|
|
@@ -24069,7 +24081,8 @@ function eval_pyson(value){
|
|
|
24069
24081
|
if (response_id == 'RESPONSE_OK') {
|
|
24070
24082
|
records = this.screen.current_view.selected_records;
|
|
24071
24083
|
} else if (response_id == 'RESPONSE_APPLY') {
|
|
24072
|
-
this.screen.search_filter(
|
|
24084
|
+
this.screen.search_filter(
|
|
24085
|
+
this.screen.screen_container.get_text());
|
|
24073
24086
|
return;
|
|
24074
24087
|
} else if (response_id == 'RESPONSE_ACCEPT') {
|
|
24075
24088
|
var view_ids = jQuery.extend([], this.view_ids);
|
|
@@ -25961,7 +25974,8 @@ function eval_pyson(value){
|
|
|
25961
25974
|
}
|
|
25962
25975
|
if (!dialog ||
|
|
25963
25976
|
!this.model ||
|
|
25964
|
-
(Sao.main_menu_screen
|
|
25977
|
+
(Sao.main_menu_screen &&
|
|
25978
|
+
(Sao.main_menu_screen.model_name == this.model))) {
|
|
25965
25979
|
is_menu = true;
|
|
25966
25980
|
screen = Sao.main_menu_screen;
|
|
25967
25981
|
} else {
|
package/dist/tryton-sao.min.css
CHANGED
|
@@ -9882,10 +9882,14 @@ img.icon {
|
|
|
9882
9882
|
min-height: 150px;
|
|
9883
9883
|
max-height: 300px;
|
|
9884
9884
|
}
|
|
9885
|
-
.form .form-text
|
|
9886
|
-
.form .form-richtext
|
|
9887
|
-
|
|
9888
|
-
|
|
9885
|
+
.form .form-text .input-group,
|
|
9886
|
+
.form .form-richtext .input-group {
|
|
9887
|
+
width: 100%;
|
|
9888
|
+
}
|
|
9889
|
+
.form .form-text .input-group textarea,
|
|
9890
|
+
.form .form-richtext .input-group textarea,
|
|
9891
|
+
.form .form-text .input-group .richtext,
|
|
9892
|
+
.form .form-richtext .input-group .richtext {
|
|
9889
9893
|
height: 100%;
|
|
9890
9894
|
line-height: 2.5ex;
|
|
9891
9895
|
min-height: 12.5ex;
|