tryton-sao 5.0.60 → 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 +4 -0
- package/COPYRIGHT +1 -1
- package/dist/tryton-sao.js +18 -17
- package/dist/tryton-sao.min.js +12 -12
- package/package.json +1 -1
- package/src/common.js +1 -1
- package/src/model.js +1 -6
- package/src/view/form.js +12 -9
- package/src/window.js +4 -1
package/CHANGELOG
CHANGED
package/COPYRIGHT
CHANGED
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 = {};
|
|
@@ -11961,13 +11956,8 @@ function eval_pyson(value){
|
|
|
11961
11956
|
return;
|
|
11962
11957
|
}
|
|
11963
11958
|
if (this.screen.pre_validate) {
|
|
11964
|
-
return record.pre_validate().then(
|
|
11965
|
-
|
|
11966
|
-
prm.reject();
|
|
11967
|
-
return;
|
|
11968
|
-
}
|
|
11969
|
-
prm.resolve();
|
|
11970
|
-
});
|
|
11959
|
+
return record.pre_validate().then(
|
|
11960
|
+
prm.resolve, prm.reject);
|
|
11971
11961
|
}
|
|
11972
11962
|
prm.resolve();
|
|
11973
11963
|
}.bind(this));
|
|
@@ -13093,7 +13083,11 @@ function eval_pyson(value){
|
|
|
13093
13083
|
return digits;
|
|
13094
13084
|
},
|
|
13095
13085
|
get_value: function() {
|
|
13096
|
-
var value =
|
|
13086
|
+
var value = this.input.val();
|
|
13087
|
+
if (!value && (value !== 0)) {
|
|
13088
|
+
return null;
|
|
13089
|
+
}
|
|
13090
|
+
value = Number(value);
|
|
13097
13091
|
if (isNaN(value)) {
|
|
13098
13092
|
return null;
|
|
13099
13093
|
}
|
|
@@ -13110,7 +13104,11 @@ function eval_pyson(value){
|
|
|
13110
13104
|
Sao.View.Form.Dict.Numeric = Sao.class_(Sao.View.Form.Dict.Float, {
|
|
13111
13105
|
class_: 'dict-numeric',
|
|
13112
13106
|
get_value: function() {
|
|
13113
|
-
var value =
|
|
13107
|
+
var value = this.input.val();
|
|
13108
|
+
if (!value && (value !== 0)) {
|
|
13109
|
+
return null;
|
|
13110
|
+
}
|
|
13111
|
+
value = new Sao.Decimal(value);
|
|
13114
13112
|
if (isNaN(value.valueOf())) {
|
|
13115
13113
|
return null;
|
|
13116
13114
|
}
|
|
@@ -19931,7 +19929,7 @@ function eval_pyson(value){
|
|
|
19931
19929
|
});
|
|
19932
19930
|
|
|
19933
19931
|
Sao.common.get_focus_chain = function(element) {
|
|
19934
|
-
var elements = element.find('input
|
|
19932
|
+
var elements = element.find('input,select,textarea');
|
|
19935
19933
|
elements.sort(function(a, b) {
|
|
19936
19934
|
if (('tabindex' in a.attributes) && ('tabindex' in b.attributes)) {
|
|
19937
19935
|
var a_tabindex = parseInt(a.attributes.tabindex.value);
|
|
@@ -20443,7 +20441,10 @@ function eval_pyson(value){
|
|
|
20443
20441
|
this.screen.current_record) {
|
|
20444
20442
|
this.screen.current_record.validate().then(function(validate) {
|
|
20445
20443
|
if (validate && this.screen.attributes.pre_validate) {
|
|
20446
|
-
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
|
+
);
|
|
20447
20448
|
}
|
|
20448
20449
|
return validate;
|
|
20449
20450
|
}.bind(this)).then(function(validate) {
|