tryton-sao 6.0.68 → 6.0.70
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.js +33 -14
- package/dist/tryton-sao.min.js +2 -2
- package/package.json +1 -1
- package/src/common.js +10 -5
- package/src/model.js +2 -2
- package/src/view/form.js +8 -3
- package/src/view/graph.js +3 -2
- package/src/view/tree.js +10 -2
- package/tests/sao.js +4 -0
package/CHANGELOG
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
|
|
2
|
+
Version 6.0.70 - 2025-12-17
|
|
3
|
+
---------------------------
|
|
4
|
+
* Bug fixes (see mercurial logs for details)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Version 6.0.69 - 2025-11-21
|
|
8
|
+
---------------------------
|
|
9
|
+
* Bug fixes (see mercurial logs for details)
|
|
10
|
+
* Escape completion content with custom format (issue14363)
|
|
11
|
+
|
|
2
12
|
Version 6.0.68 - 2025-11-02
|
|
3
13
|
---------------------------
|
|
4
14
|
* Bug fixes (see mercurial logs for details)
|
package/dist/tryton-sao.js
CHANGED
|
@@ -4166,11 +4166,12 @@ var Sao = {};
|
|
|
4166
4166
|
var name = clause[0];
|
|
4167
4167
|
var operator = clause[1];
|
|
4168
4168
|
var value = clause[2];
|
|
4169
|
-
if (name.endsWith('.rec_name')
|
|
4169
|
+
if (name.endsWith('.rec_name')
|
|
4170
|
+
&& (value || (clause.length > 3))) {
|
|
4170
4171
|
name = name.slice(0, -9);
|
|
4171
4172
|
}
|
|
4172
4173
|
if (!(name in this.fields)) {
|
|
4173
|
-
if (this.is_full_text(value)) {
|
|
4174
|
+
if ((value !== null) && this.is_full_text(value)) {
|
|
4174
4175
|
value = value.slice(1, -1);
|
|
4175
4176
|
}
|
|
4176
4177
|
return this.quote(value);
|
|
@@ -5111,7 +5112,7 @@ var Sao = {};
|
|
|
5111
5112
|
break;
|
|
5112
5113
|
}
|
|
5113
5114
|
}
|
|
5114
|
-
return target + ',' + value;
|
|
5115
|
+
return target + ',' + (value || '');
|
|
5115
5116
|
};
|
|
5116
5117
|
|
|
5117
5118
|
var converts = {
|
|
@@ -6613,9 +6614,13 @@ var Sao = {};
|
|
|
6613
6614
|
},
|
|
6614
6615
|
_format: function(content) {
|
|
6615
6616
|
if (this.format) {
|
|
6616
|
-
|
|
6617
|
+
content = this.format(content);
|
|
6618
|
+
}
|
|
6619
|
+
if (content instanceof jQuery) {
|
|
6620
|
+
return content;
|
|
6621
|
+
} else {
|
|
6622
|
+
return jQuery('<span/>').text(content);
|
|
6617
6623
|
}
|
|
6618
|
-
return jQuery('<span/>').text(content);
|
|
6619
6624
|
},
|
|
6620
6625
|
_format_action: function(content) {
|
|
6621
6626
|
if (this.format_action) {
|
|
@@ -7465,7 +7470,7 @@ var Sao = {};
|
|
|
7465
7470
|
array.save = function() {
|
|
7466
7471
|
var deferreds = [];
|
|
7467
7472
|
this.forEach(function(record) {
|
|
7468
|
-
deferreds.push(record.save());
|
|
7473
|
+
deferreds.push(record.save(false));
|
|
7469
7474
|
});
|
|
7470
7475
|
if (!jQuery.isEmptyObject(this.record_deleted)) {
|
|
7471
7476
|
this.record_deleted.forEach(function(record) {
|
|
@@ -7749,7 +7754,7 @@ var Sao = {};
|
|
|
7749
7754
|
},
|
|
7750
7755
|
save: function(force_reload) {
|
|
7751
7756
|
if (force_reload === undefined) {
|
|
7752
|
-
force_reload =
|
|
7757
|
+
force_reload = true;
|
|
7753
7758
|
}
|
|
7754
7759
|
var context = this.get_context();
|
|
7755
7760
|
var prm = jQuery.when();
|
|
@@ -16169,7 +16174,7 @@ function eval_pyson(value){
|
|
|
16169
16174
|
},
|
|
16170
16175
|
get width() {
|
|
16171
16176
|
var digits = this.digits;
|
|
16172
|
-
if (digits) {
|
|
16177
|
+
if (digits && digits.every(d => d !== null)) {
|
|
16173
16178
|
return digits.reduce(function(acc, cur) {
|
|
16174
16179
|
return acc + cur;
|
|
16175
16180
|
});
|
|
@@ -16770,15 +16775,21 @@ function eval_pyson(value){
|
|
|
16770
16775
|
this.entry.val('');
|
|
16771
16776
|
return;
|
|
16772
16777
|
}
|
|
16778
|
+
let view_ids = (this.attributes.view_ids || '').split(',');
|
|
16773
16779
|
if (this.has_target(value)) {
|
|
16774
16780
|
var m2o_id =
|
|
16775
16781
|
this.id_from_value(record.field_get(this.field_name));
|
|
16776
16782
|
if (evt && (evt.ctrlKey || evt.metaKey)) {
|
|
16783
|
+
if (!jQuery.isEmptyObject(view_ids)) {
|
|
16784
|
+
// Remove the first tree view as mode is form only
|
|
16785
|
+
view_ids.shift();
|
|
16786
|
+
}
|
|
16777
16787
|
var params = {};
|
|
16778
16788
|
params.model = this.get_model();
|
|
16779
16789
|
params.res_id = m2o_id;
|
|
16780
16790
|
params.mode = ['form'];
|
|
16781
16791
|
params.name = this.attributes.string;
|
|
16792
|
+
params.view_ids = view_ids;
|
|
16782
16793
|
params.context = this.field.get_context(this.record);
|
|
16783
16794
|
Sao.Tab.create(params);
|
|
16784
16795
|
return;
|
|
@@ -16824,8 +16835,7 @@ function eval_pyson(value){
|
|
|
16824
16835
|
context: context,
|
|
16825
16836
|
domain: domain,
|
|
16826
16837
|
order: order,
|
|
16827
|
-
view_ids:
|
|
16828
|
-
'').split(','),
|
|
16838
|
+
view_ids: view_ids,
|
|
16829
16839
|
views_preload: (this.attributes.views || {}),
|
|
16830
16840
|
new_: this.create_access,
|
|
16831
16841
|
search_filter: parser.quote(text),
|
|
@@ -21254,9 +21264,11 @@ function eval_pyson(value){
|
|
|
21254
21264
|
return;
|
|
21255
21265
|
}
|
|
21256
21266
|
|
|
21257
|
-
body =
|
|
21267
|
+
body = jQuery(document.body);
|
|
21258
21268
|
if (body.hasClass('modal-open')) {
|
|
21259
21269
|
listener = this.tree.el.parents('.modal').last();
|
|
21270
|
+
} else {
|
|
21271
|
+
listener = this.tree.el.parents('.tab-pane').last();
|
|
21260
21272
|
}
|
|
21261
21273
|
var handler = function(event_) {
|
|
21262
21274
|
if ((event_.currentTarget == body[0]) &&
|
|
@@ -21269,7 +21281,7 @@ function eval_pyson(value){
|
|
|
21269
21281
|
event_.stopPropagation();
|
|
21270
21282
|
return;
|
|
21271
21283
|
}
|
|
21272
|
-
|
|
21284
|
+
listener.off('click.sao.editabletree');
|
|
21273
21285
|
this.tree.edit_row(null);
|
|
21274
21286
|
return true;
|
|
21275
21287
|
}.bind(this);
|
|
@@ -21762,12 +21774,18 @@ function eval_pyson(value){
|
|
|
21762
21774
|
cell = cell.children('a');
|
|
21763
21775
|
cell.unbind('click');
|
|
21764
21776
|
Sao.View.Tree.Many2OneColumn._super.update_text.call(this, cell, record);
|
|
21777
|
+
let view_ids = (this.attributes.view_ids || '').split(',');
|
|
21778
|
+
if (!jQuery.isEmptyObject(view_ids)) {
|
|
21779
|
+
// Remove the first tree view as mode is form only
|
|
21780
|
+
view_ids.shift();
|
|
21781
|
+
}
|
|
21765
21782
|
cell.click(function(event) {
|
|
21766
21783
|
event.stopPropagation();
|
|
21767
21784
|
var params = {};
|
|
21768
21785
|
params.model = this.attributes.relation;
|
|
21769
21786
|
params.res_id = this.field.get(record);
|
|
21770
21787
|
params.mode = ['form'];
|
|
21788
|
+
params.view_ids = view_ids;
|
|
21771
21789
|
params.name = this.attributes.string;
|
|
21772
21790
|
params.context = this.field.get_context(record);
|
|
21773
21791
|
Sao.Tab.create(params);
|
|
@@ -22586,7 +22604,7 @@ function eval_pyson(value){
|
|
|
22586
22604
|
},
|
|
22587
22605
|
action: function(data, element) {
|
|
22588
22606
|
var ids = this.ids[this._action_key(data)];
|
|
22589
|
-
var ctx = jQuery.extend({}, this.view.screen.group.
|
|
22607
|
+
var ctx = jQuery.extend({}, this.view.screen.group.local_context);
|
|
22590
22608
|
delete ctx.active_ids;
|
|
22591
22609
|
delete ctx.active_id;
|
|
22592
22610
|
Sao.Action.exec_keyword('graph_open', {
|
|
@@ -22707,7 +22725,8 @@ function eval_pyson(value){
|
|
|
22707
22725
|
Sao.View.Graph.Pie._super._add_id.call(this, key, id);
|
|
22708
22726
|
},
|
|
22709
22727
|
_action_key: function(data) {
|
|
22710
|
-
|
|
22728
|
+
// data.name is the label used for the x axis
|
|
22729
|
+
return data.name;
|
|
22711
22730
|
}
|
|
22712
22731
|
});
|
|
22713
22732
|
|