tryton-sao 7.2.5 → 7.2.6
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 +5 -0
- package/dist/tryton-sao.js +16 -6
- package/package.json +1 -1
- package/src/common.js +1 -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
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.6',
|
|
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) {
|
|
@@ -17600,6 +17600,7 @@ function eval_pyson(value){
|
|
|
17600
17600
|
params.name = this.attributes.string;
|
|
17601
17601
|
params.context = this.field.get_context(this.record);
|
|
17602
17602
|
Sao.Tab.create(params);
|
|
17603
|
+
this._popup = false;
|
|
17603
17604
|
return;
|
|
17604
17605
|
}
|
|
17605
17606
|
var screen = this.get_screen();
|
|
@@ -19589,7 +19590,7 @@ function eval_pyson(value){
|
|
|
19589
19590
|
},
|
|
19590
19591
|
set_url: function(value) {
|
|
19591
19592
|
this.button.attr('href', value);
|
|
19592
|
-
this.button.toggle(value);
|
|
19593
|
+
this.button.toggle(Boolean(value));
|
|
19593
19594
|
},
|
|
19594
19595
|
set_invisible: function(invisible) {
|
|
19595
19596
|
Sao.View.Form.URL._super.set_invisible.call(this, invisible);
|
|
@@ -21001,13 +21002,14 @@ function eval_pyson(value){
|
|
|
21001
21002
|
this.selected_records.forEach((record) => {
|
|
21002
21003
|
var values = [];
|
|
21003
21004
|
this.columns.forEach((col) => {
|
|
21004
|
-
if (!col.get_visible() || !col.attributes.name
|
|
21005
|
+
if (!col.get_visible() || !col.attributes.name ||
|
|
21006
|
+
col instanceof Sao.View.Tree.ButtonColumn) {
|
|
21005
21007
|
return;
|
|
21006
21008
|
}
|
|
21007
21009
|
var text;
|
|
21008
21010
|
if (!record.is_loaded(col.attributes.name)) {
|
|
21009
21011
|
try {
|
|
21010
|
-
record.load(
|
|
21012
|
+
record.load(col.attributes.name, false, false);
|
|
21011
21013
|
text = col.get_textual_value(record);
|
|
21012
21014
|
} catch (e) {
|
|
21013
21015
|
Sao.Logger.error(
|
|
@@ -23983,7 +23985,15 @@ function eval_pyson(value){
|
|
|
23983
23985
|
}, ctx, false);
|
|
23984
23986
|
},
|
|
23985
23987
|
_action_key: function(data) {
|
|
23986
|
-
|
|
23988
|
+
var x = data.x;
|
|
23989
|
+
var type = this.view.screen.model.fields[this.xfield.name]
|
|
23990
|
+
.description.type;
|
|
23991
|
+
if (x && (type == 'datetime')) {
|
|
23992
|
+
x = Sao.DateTime(x).toString();
|
|
23993
|
+
} else if (x && (type == 'date')) {
|
|
23994
|
+
x = Sao.Date(x).toString();
|
|
23995
|
+
}
|
|
23996
|
+
return x;
|
|
23987
23997
|
}
|
|
23988
23998
|
});
|
|
23989
23999
|
|
package/package.json
CHANGED
package/src/common.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]));
|