tryton-sao 7.0.39 → 7.0.41
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 +34 -15
- 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/sao.js +1 -1
- 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 7.0.41 - 2025-12-17
|
|
3
|
+
---------------------------
|
|
4
|
+
* Bug fixes (see mercurial logs for details)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Version 7.0.40 - 2025-11-21
|
|
8
|
+
---------------------------
|
|
9
|
+
* Bug fixes (see mercurial logs for details)
|
|
10
|
+
* Escape completion content with custom format (issue14363)
|
|
11
|
+
|
|
2
12
|
Version 7.0.39 - 2025-11-02
|
|
3
13
|
---------------------------
|
|
4
14
|
* Bug fixes (see mercurial logs for details)
|
package/dist/tryton-sao.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
/* eslint-disable no-redeclare */
|
|
5
5
|
var Sao = {
|
|
6
|
-
__version__: '7.0.
|
|
6
|
+
__version__: '7.0.41',
|
|
7
7
|
};
|
|
8
8
|
/* eslint-enable no-redeclare */
|
|
9
9
|
|
|
@@ -4447,11 +4447,12 @@ var Sao = {
|
|
|
4447
4447
|
var name = clause[0];
|
|
4448
4448
|
var operator = clause[1];
|
|
4449
4449
|
var value = clause[2];
|
|
4450
|
-
if (name.endsWith('.rec_name')
|
|
4450
|
+
if (name.endsWith('.rec_name')
|
|
4451
|
+
&& (value || (clause.length > 3))) {
|
|
4451
4452
|
name = name.slice(0, -9);
|
|
4452
4453
|
}
|
|
4453
4454
|
if (!(name in this.fields)) {
|
|
4454
|
-
if (this.is_full_text(value)) {
|
|
4455
|
+
if ((value !== null) && this.is_full_text(value)) {
|
|
4455
4456
|
value = value.slice(1, -1);
|
|
4456
4457
|
}
|
|
4457
4458
|
return this.quote(value);
|
|
@@ -5376,7 +5377,7 @@ var Sao = {
|
|
|
5376
5377
|
break;
|
|
5377
5378
|
}
|
|
5378
5379
|
}
|
|
5379
|
-
return target + ',' + value;
|
|
5380
|
+
return target + ',' + (value || '');
|
|
5380
5381
|
};
|
|
5381
5382
|
|
|
5382
5383
|
var converts = {
|
|
@@ -7027,9 +7028,13 @@ var Sao = {
|
|
|
7027
7028
|
},
|
|
7028
7029
|
_format: function(content) {
|
|
7029
7030
|
if (this.format) {
|
|
7030
|
-
|
|
7031
|
+
content = this.format(content);
|
|
7032
|
+
}
|
|
7033
|
+
if (content instanceof jQuery) {
|
|
7034
|
+
return content;
|
|
7035
|
+
} else {
|
|
7036
|
+
return jQuery('<span/>').text(content);
|
|
7031
7037
|
}
|
|
7032
|
-
return jQuery('<span/>').text(content);
|
|
7033
7038
|
},
|
|
7034
7039
|
_format_action: function(content) {
|
|
7035
7040
|
if (this.format_action) {
|
|
@@ -7893,7 +7898,7 @@ var Sao = {
|
|
|
7893
7898
|
array.save = function() {
|
|
7894
7899
|
var deferreds = [];
|
|
7895
7900
|
this.forEach(record => {
|
|
7896
|
-
deferreds.push(record.save());
|
|
7901
|
+
deferreds.push(record.save(false));
|
|
7897
7902
|
});
|
|
7898
7903
|
if (!jQuery.isEmptyObject(this.record_deleted)) {
|
|
7899
7904
|
for (const record of this.record_deleted) {
|
|
@@ -8175,7 +8180,7 @@ var Sao = {
|
|
|
8175
8180
|
return false;
|
|
8176
8181
|
}
|
|
8177
8182
|
},
|
|
8178
|
-
save: function(force_reload=
|
|
8183
|
+
save: function(force_reload=true) {
|
|
8179
8184
|
var context = this.get_context();
|
|
8180
8185
|
if (this._save_prm.state() == 'pending') {
|
|
8181
8186
|
return this._save_prm.then(() => this.save(force_reload));
|
|
@@ -16850,7 +16855,7 @@ function eval_pyson(value){
|
|
|
16850
16855
|
},
|
|
16851
16856
|
get width() {
|
|
16852
16857
|
var digits = this.digits;
|
|
16853
|
-
if (digits) {
|
|
16858
|
+
if (digits && digits.every(d => d !== null)) {
|
|
16854
16859
|
return digits.reduce(function(acc, cur) {
|
|
16855
16860
|
return acc + cur;
|
|
16856
16861
|
});
|
|
@@ -17460,15 +17465,21 @@ function eval_pyson(value){
|
|
|
17460
17465
|
this.focus();
|
|
17461
17466
|
return;
|
|
17462
17467
|
}
|
|
17468
|
+
let view_ids = (this.attributes.view_ids || '').split(',');
|
|
17463
17469
|
if (this.has_target(value)) {
|
|
17464
17470
|
var m2o_id =
|
|
17465
17471
|
this.id_from_value(record.field_get(this.field_name));
|
|
17466
17472
|
if (evt && (evt.ctrlKey || evt.metaKey)) {
|
|
17473
|
+
if (!jQuery.isEmptyObject(view_ids)) {
|
|
17474
|
+
// Remove the first tree view as mode is form only
|
|
17475
|
+
view_ids.shift();
|
|
17476
|
+
}
|
|
17467
17477
|
var params = {};
|
|
17468
17478
|
params.model = this.get_model();
|
|
17469
17479
|
params.res_id = m2o_id;
|
|
17470
17480
|
params.mode = ['form'];
|
|
17471
17481
|
params.name = this.attributes.string;
|
|
17482
|
+
params.view_ids = view_ids;
|
|
17472
17483
|
params.context = this.field.get_context(this.record);
|
|
17473
17484
|
Sao.Tab.create(params);
|
|
17474
17485
|
return;
|
|
@@ -17515,8 +17526,7 @@ function eval_pyson(value){
|
|
|
17515
17526
|
context: context,
|
|
17516
17527
|
domain: domain,
|
|
17517
17528
|
order: order,
|
|
17518
|
-
view_ids:
|
|
17519
|
-
'').split(','),
|
|
17529
|
+
view_ids: view_ids,
|
|
17520
17530
|
views_preload: (this.attributes.views || {}),
|
|
17521
17531
|
new_: this.create_access,
|
|
17522
17532
|
search_filter: parser.quote(text),
|
|
@@ -22332,9 +22342,11 @@ function eval_pyson(value){
|
|
|
22332
22342
|
return;
|
|
22333
22343
|
}
|
|
22334
22344
|
|
|
22335
|
-
body =
|
|
22345
|
+
body = jQuery(document.body);
|
|
22336
22346
|
if (body.hasClass('modal-open')) {
|
|
22337
22347
|
listener = this.tree.el.parents('.modal').last();
|
|
22348
|
+
} else {
|
|
22349
|
+
listener = this.tree.el.parents('.tab-pane').last();
|
|
22338
22350
|
}
|
|
22339
22351
|
const handler = event_ => {
|
|
22340
22352
|
if ((event_.currentTarget == body[0]) &&
|
|
@@ -22347,7 +22359,7 @@ function eval_pyson(value){
|
|
|
22347
22359
|
event_.stopPropagation();
|
|
22348
22360
|
return;
|
|
22349
22361
|
}
|
|
22350
|
-
|
|
22362
|
+
listener.off('click.sao.editabletree');
|
|
22351
22363
|
this.tree.edit_row(null);
|
|
22352
22364
|
return true;
|
|
22353
22365
|
};
|
|
@@ -22877,12 +22889,18 @@ function eval_pyson(value){
|
|
|
22877
22889
|
cell = cell.children('a');
|
|
22878
22890
|
cell.unbind('click');
|
|
22879
22891
|
Sao.View.Tree.Many2OneColumn._super.update_text.call(this, cell, record);
|
|
22892
|
+
let view_ids = (this.attributes.view_ids || '').split(',');
|
|
22893
|
+
if (!jQuery.isEmptyObject(view_ids)) {
|
|
22894
|
+
// Remove the first tree view as mode is form only
|
|
22895
|
+
view_ids.shift();
|
|
22896
|
+
}
|
|
22880
22897
|
cell.click(event => {
|
|
22881
22898
|
event.stopPropagation();
|
|
22882
22899
|
var params = {};
|
|
22883
22900
|
params.model = this.attributes.relation;
|
|
22884
22901
|
params.res_id = this.field.get(record);
|
|
22885
22902
|
params.mode = ['form'];
|
|
22903
|
+
params.view_ids = view_ids;
|
|
22886
22904
|
params.name = this.attributes.string;
|
|
22887
22905
|
params.context = this.field.get_context(record);
|
|
22888
22906
|
Sao.Tab.create(params);
|
|
@@ -23807,7 +23825,7 @@ function eval_pyson(value){
|
|
|
23807
23825
|
},
|
|
23808
23826
|
action: function(data, element) {
|
|
23809
23827
|
var ids = this.ids[this._action_key(data)];
|
|
23810
|
-
var ctx = jQuery.extend({}, this.view.screen.group.
|
|
23828
|
+
var ctx = jQuery.extend({}, this.view.screen.group.local_context);
|
|
23811
23829
|
delete ctx.active_ids;
|
|
23812
23830
|
delete ctx.active_id;
|
|
23813
23831
|
Sao.Action.exec_keyword('graph_open', {
|
|
@@ -23928,7 +23946,8 @@ function eval_pyson(value){
|
|
|
23928
23946
|
Sao.View.Graph.Pie._super._add_id.call(this, key, id);
|
|
23929
23947
|
},
|
|
23930
23948
|
_action_key: function(data) {
|
|
23931
|
-
|
|
23949
|
+
// data.name is the label used for the x axis
|
|
23950
|
+
return data.name;
|
|
23932
23951
|
}
|
|
23933
23952
|
});
|
|
23934
23953
|
|