tryton-sao 7.2.5 → 7.2.7
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 +19 -7
- package/package.json +1 -1
- package/src/common.js +1 -1
- package/src/model.js +3 -1
- package/src/sao.js +1 -1
- package/src/view/form.js +2 -1
- package/src/view/graph.js +9 -1
- package/src/view/tree.js +3 -2
- package/tests/sao.js +2 -0
package/CHANGELOG
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
|
|
2
|
+
Version 7.2.7 - 2024-09-16
|
|
3
|
+
--------------------------
|
|
4
|
+
* Bug fixes (see mercurial logs for details)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Version 7.2.6 - 2024-09-01
|
|
8
|
+
--------------------------
|
|
9
|
+
* Bug fixes (see mercurial logs for details)
|
|
10
|
+
|
|
11
|
+
|
|
2
12
|
Version 7.2.5 - 2024-08-01
|
|
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.2.
|
|
6
|
+
__version__: '7.2.7',
|
|
7
7
|
};
|
|
8
8
|
/* eslint-enable no-redeclare */
|
|
9
9
|
|
|
@@ -4485,7 +4485,7 @@ var Sao = {
|
|
|
4485
4485
|
},
|
|
4486
4486
|
stringable: function(domain) {
|
|
4487
4487
|
const stringable_ = clause => {
|
|
4488
|
-
if (!clause) {
|
|
4488
|
+
if (!clause || jQuery.isEmptyObject(clause)) {
|
|
4489
4489
|
return true;
|
|
4490
4490
|
}
|
|
4491
4491
|
var is_array = function(e) {
|
|
@@ -8463,7 +8463,9 @@ var Sao = {
|
|
|
8463
8463
|
id: id
|
|
8464
8464
|
};
|
|
8465
8465
|
for (const fname of fnames_to_fetch) {
|
|
8466
|
-
|
|
8466
|
+
if (fname != 'id') {
|
|
8467
|
+
default_values[fname] = null;
|
|
8468
|
+
}
|
|
8467
8469
|
}
|
|
8468
8470
|
failed_values.push(default_values);
|
|
8469
8471
|
}
|
|
@@ -17600,6 +17602,7 @@ function eval_pyson(value){
|
|
|
17600
17602
|
params.name = this.attributes.string;
|
|
17601
17603
|
params.context = this.field.get_context(this.record);
|
|
17602
17604
|
Sao.Tab.create(params);
|
|
17605
|
+
this._popup = false;
|
|
17603
17606
|
return;
|
|
17604
17607
|
}
|
|
17605
17608
|
var screen = this.get_screen();
|
|
@@ -19589,7 +19592,7 @@ function eval_pyson(value){
|
|
|
19589
19592
|
},
|
|
19590
19593
|
set_url: function(value) {
|
|
19591
19594
|
this.button.attr('href', value);
|
|
19592
|
-
this.button.toggle(value);
|
|
19595
|
+
this.button.toggle(Boolean(value));
|
|
19593
19596
|
},
|
|
19594
19597
|
set_invisible: function(invisible) {
|
|
19595
19598
|
Sao.View.Form.URL._super.set_invisible.call(this, invisible);
|
|
@@ -21001,13 +21004,14 @@ function eval_pyson(value){
|
|
|
21001
21004
|
this.selected_records.forEach((record) => {
|
|
21002
21005
|
var values = [];
|
|
21003
21006
|
this.columns.forEach((col) => {
|
|
21004
|
-
if (!col.get_visible() || !col.attributes.name
|
|
21007
|
+
if (!col.get_visible() || !col.attributes.name ||
|
|
21008
|
+
col instanceof Sao.View.Tree.ButtonColumn) {
|
|
21005
21009
|
return;
|
|
21006
21010
|
}
|
|
21007
21011
|
var text;
|
|
21008
21012
|
if (!record.is_loaded(col.attributes.name)) {
|
|
21009
21013
|
try {
|
|
21010
|
-
record.load(
|
|
21014
|
+
record.load(col.attributes.name, false, false);
|
|
21011
21015
|
text = col.get_textual_value(record);
|
|
21012
21016
|
} catch (e) {
|
|
21013
21017
|
Sao.Logger.error(
|
|
@@ -23983,7 +23987,15 @@ function eval_pyson(value){
|
|
|
23983
23987
|
}, ctx, false);
|
|
23984
23988
|
},
|
|
23985
23989
|
_action_key: function(data) {
|
|
23986
|
-
|
|
23990
|
+
var x = data.x;
|
|
23991
|
+
var type = this.view.screen.model.fields[this.xfield.name]
|
|
23992
|
+
.description.type;
|
|
23993
|
+
if (x && (type == 'datetime')) {
|
|
23994
|
+
x = Sao.DateTime(x).toString();
|
|
23995
|
+
} else if (x && (type == 'date')) {
|
|
23996
|
+
x = Sao.Date(x).toString();
|
|
23997
|
+
}
|
|
23998
|
+
return x;
|
|
23987
23999
|
}
|
|
23988
24000
|
});
|
|
23989
24001
|
|
package/package.json
CHANGED
package/src/common.js
CHANGED
package/src/model.js
CHANGED
package/src/sao.js
CHANGED
package/src/view/form.js
CHANGED
|
@@ -2772,6 +2772,7 @@ function eval_pyson(value){
|
|
|
2772
2772
|
params.name = this.attributes.string;
|
|
2773
2773
|
params.context = this.field.get_context(this.record);
|
|
2774
2774
|
Sao.Tab.create(params);
|
|
2775
|
+
this._popup = false;
|
|
2775
2776
|
return;
|
|
2776
2777
|
}
|
|
2777
2778
|
var screen = this.get_screen();
|
|
@@ -4761,7 +4762,7 @@ function eval_pyson(value){
|
|
|
4761
4762
|
},
|
|
4762
4763
|
set_url: function(value) {
|
|
4763
4764
|
this.button.attr('href', value);
|
|
4764
|
-
this.button.toggle(value);
|
|
4765
|
+
this.button.toggle(Boolean(value));
|
|
4765
4766
|
},
|
|
4766
4767
|
set_invisible: function(invisible) {
|
|
4767
4768
|
Sao.View.Form.URL._super.set_invisible.call(this, invisible);
|
package/src/view/graph.js
CHANGED
|
@@ -248,7 +248,15 @@
|
|
|
248
248
|
}, ctx, false);
|
|
249
249
|
},
|
|
250
250
|
_action_key: function(data) {
|
|
251
|
-
|
|
251
|
+
var x = data.x;
|
|
252
|
+
var type = this.view.screen.model.fields[this.xfield.name]
|
|
253
|
+
.description.type;
|
|
254
|
+
if (x && (type == 'datetime')) {
|
|
255
|
+
x = Sao.DateTime(x).toString();
|
|
256
|
+
} else if (x && (type == 'date')) {
|
|
257
|
+
x = Sao.Date(x).toString();
|
|
258
|
+
}
|
|
259
|
+
return x;
|
|
252
260
|
}
|
|
253
261
|
});
|
|
254
262
|
|
package/src/view/tree.js
CHANGED
|
@@ -506,13 +506,14 @@
|
|
|
506
506
|
this.selected_records.forEach((record) => {
|
|
507
507
|
var values = [];
|
|
508
508
|
this.columns.forEach((col) => {
|
|
509
|
-
if (!col.get_visible() || !col.attributes.name
|
|
509
|
+
if (!col.get_visible() || !col.attributes.name ||
|
|
510
|
+
col instanceof Sao.View.Tree.ButtonColumn) {
|
|
510
511
|
return;
|
|
511
512
|
}
|
|
512
513
|
var text;
|
|
513
514
|
if (!record.is_loaded(col.attributes.name)) {
|
|
514
515
|
try {
|
|
515
|
-
record.load(
|
|
516
|
+
record.load(col.attributes.name, false, false);
|
|
516
517
|
text = col.get_textual_value(record);
|
|
517
518
|
} catch (e) {
|
|
518
519
|
Sao.Logger.error(
|
package/tests/sao.js
CHANGED
|
@@ -2186,6 +2186,8 @@
|
|
|
2186
2186
|
});
|
|
2187
2187
|
var valid = ['name', '=', 'Doe'];
|
|
2188
2188
|
var invalid = ['surname', '=', 'John'];
|
|
2189
|
+
QUnit.ok(parser.stringable([]));
|
|
2190
|
+
QUnit.ok(parser.stringable([[]]));
|
|
2189
2191
|
QUnit.ok(parser.stringable([valid]));
|
|
2190
2192
|
QUnit.ok(!parser.stringable([invalid]));
|
|
2191
2193
|
QUnit.ok(parser.stringable(['AND', valid]));
|