tryton-sao 5.0.59 → 5.0.61
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 +8 -0
- package/COPYRIGHT +3 -3
- package/dist/tryton-sao.js +20 -18
- package/dist/tryton-sao.min.js +10 -10
- package/package.json +1 -1
- package/src/common.js +1 -1
- package/src/model.js +1 -6
- package/src/screen.js +2 -1
- package/src/view/form.js +12 -9
- package/src/window.js +4 -1
package/CHANGELOG
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
Version 5.0.61 - 2023-02-17
|
|
2
|
+
---------------------------
|
|
3
|
+
* Bug fixes (see mercurial logs for details)
|
|
4
|
+
|
|
5
|
+
Version 5.0.60 - 2023-01-15
|
|
6
|
+
---------------------------
|
|
7
|
+
* Bug fixes (see mercurial logs for details)
|
|
8
|
+
|
|
1
9
|
Version 5.0.59 - 2023-01-02
|
|
2
10
|
---------------------------
|
|
3
11
|
* Bug fixes (see mercurial logs for details)
|
package/COPYRIGHT
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
Copyright (C) 2012-
|
|
2
|
-
Copyright (C) 2012-
|
|
1
|
+
Copyright (C) 2012-2023 Nicolas Évrard.
|
|
2
|
+
Copyright (C) 2012-2023 Cédric Krier.
|
|
3
3
|
Copyright (C) 2012-2014 Bertrand Chenal.
|
|
4
|
-
Copyright (C) 2012-
|
|
4
|
+
Copyright (C) 2012-2023 B2CK SPRL.
|
|
5
5
|
Copyright (C) 2019 Jitbit.
|
|
6
6
|
|
|
7
7
|
This program is free software: you can redistribute it and/or modify
|
package/dist/tryton-sao.js
CHANGED
|
@@ -3914,12 +3914,7 @@ var Sao = {};
|
|
|
3914
3914
|
var values = this._get_on_change_args(
|
|
3915
3915
|
Object.keys(this._changed).concat(['id']));
|
|
3916
3916
|
return this.model.execute('pre_validate',
|
|
3917
|
-
[values], this.get_context())
|
|
3918
|
-
.then(function() {
|
|
3919
|
-
return true;
|
|
3920
|
-
}, function() {
|
|
3921
|
-
return false;
|
|
3922
|
-
});
|
|
3917
|
+
[values], this.get_context());
|
|
3923
3918
|
},
|
|
3924
3919
|
cancel: function() {
|
|
3925
3920
|
this._loaded = {};
|
|
@@ -8151,7 +8146,8 @@ var Sao = {};
|
|
|
8151
8146
|
for (var name in fields) {
|
|
8152
8147
|
var props = fields[name];
|
|
8153
8148
|
if ((props.type != 'selection') &&
|
|
8154
|
-
|
|
8149
|
+
(props.type != 'multiselection') &&
|
|
8150
|
+
(props.type != 'reference')) {
|
|
8155
8151
|
continue;
|
|
8156
8152
|
}
|
|
8157
8153
|
if (props.selection instanceof Array) {
|
|
@@ -11960,13 +11956,8 @@ function eval_pyson(value){
|
|
|
11960
11956
|
return;
|
|
11961
11957
|
}
|
|
11962
11958
|
if (this.screen.pre_validate) {
|
|
11963
|
-
return record.pre_validate().then(
|
|
11964
|
-
|
|
11965
|
-
prm.reject();
|
|
11966
|
-
return;
|
|
11967
|
-
}
|
|
11968
|
-
prm.resolve();
|
|
11969
|
-
});
|
|
11959
|
+
return record.pre_validate().then(
|
|
11960
|
+
prm.resolve, prm.reject);
|
|
11970
11961
|
}
|
|
11971
11962
|
prm.resolve();
|
|
11972
11963
|
}.bind(this));
|
|
@@ -13092,7 +13083,11 @@ function eval_pyson(value){
|
|
|
13092
13083
|
return digits;
|
|
13093
13084
|
},
|
|
13094
13085
|
get_value: function() {
|
|
13095
|
-
var value =
|
|
13086
|
+
var value = this.input.val();
|
|
13087
|
+
if (!value && (value !== 0)) {
|
|
13088
|
+
return null;
|
|
13089
|
+
}
|
|
13090
|
+
value = Number(value);
|
|
13096
13091
|
if (isNaN(value)) {
|
|
13097
13092
|
return null;
|
|
13098
13093
|
}
|
|
@@ -13109,7 +13104,11 @@ function eval_pyson(value){
|
|
|
13109
13104
|
Sao.View.Form.Dict.Numeric = Sao.class_(Sao.View.Form.Dict.Float, {
|
|
13110
13105
|
class_: 'dict-numeric',
|
|
13111
13106
|
get_value: function() {
|
|
13112
|
-
var value =
|
|
13107
|
+
var value = this.input.val();
|
|
13108
|
+
if (!value && (value !== 0)) {
|
|
13109
|
+
return null;
|
|
13110
|
+
}
|
|
13111
|
+
value = new Sao.Decimal(value);
|
|
13113
13112
|
if (isNaN(value.valueOf())) {
|
|
13114
13113
|
return null;
|
|
13115
13114
|
}
|
|
@@ -19930,7 +19929,7 @@ function eval_pyson(value){
|
|
|
19930
19929
|
});
|
|
19931
19930
|
|
|
19932
19931
|
Sao.common.get_focus_chain = function(element) {
|
|
19933
|
-
var elements = element.find('input
|
|
19932
|
+
var elements = element.find('input,select,textarea');
|
|
19934
19933
|
elements.sort(function(a, b) {
|
|
19935
19934
|
if (('tabindex' in a.attributes) && ('tabindex' in b.attributes)) {
|
|
19936
19935
|
var a_tabindex = parseInt(a.attributes.tabindex.value);
|
|
@@ -20442,7 +20441,10 @@ function eval_pyson(value){
|
|
|
20442
20441
|
this.screen.current_record) {
|
|
20443
20442
|
this.screen.current_record.validate().then(function(validate) {
|
|
20444
20443
|
if (validate && this.screen.attributes.pre_validate) {
|
|
20445
|
-
return this.screen.current_record.pre_validate()
|
|
20444
|
+
return this.screen.current_record.pre_validate().then(
|
|
20445
|
+
function () { return true; },
|
|
20446
|
+
function () { return false; }
|
|
20447
|
+
);
|
|
20446
20448
|
}
|
|
20447
20449
|
return validate;
|
|
20448
20450
|
}.bind(this)).then(function(validate) {
|