tryton-sao 6.4.7 → 6.4.8
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/dist/tryton-sao.js +18 -4
- package/dist/tryton-sao.min.js +2 -2
- package/locale/fr.json +1 -1
- package/locale/fr.po +1 -1
- package/package.json +1 -1
- package/src/common.js +4 -1
- package/src/view/form.js +14 -3
package/CHANGELOG
CHANGED
package/dist/tryton-sao.js
CHANGED
|
@@ -3769,9 +3769,12 @@ var Sao = {};
|
|
|
3769
3769
|
};
|
|
3770
3770
|
|
|
3771
3771
|
var evaluator;
|
|
3772
|
-
|
|
3772
|
+
var type_ = field.description.type;
|
|
3773
|
+
if (type_ == 'reference') {
|
|
3773
3774
|
var allowed_models = field.get_models(record);
|
|
3774
3775
|
evaluator = _model_evaluator(allowed_models);
|
|
3776
|
+
} else if (type_ == 'multiselection') {
|
|
3777
|
+
return;
|
|
3775
3778
|
} else {
|
|
3776
3779
|
evaluator = _value_evaluator;
|
|
3777
3780
|
}
|
|
@@ -16376,15 +16379,26 @@ function eval_pyson(value){
|
|
|
16376
16379
|
},
|
|
16377
16380
|
get modified() {
|
|
16378
16381
|
if (this.record && this.field) {
|
|
16379
|
-
|
|
16382
|
+
var value = this._normalize_newline(
|
|
16383
|
+
this.field.get_client(this.record));
|
|
16384
|
+
return value != this.get_value();
|
|
16380
16385
|
}
|
|
16381
16386
|
return false;
|
|
16382
16387
|
},
|
|
16383
16388
|
get_value: function() {
|
|
16384
|
-
return this.input.val() || '';
|
|
16389
|
+
return this._normalize_newline(this.input.val() || '');
|
|
16385
16390
|
},
|
|
16386
16391
|
set_value: function() {
|
|
16387
|
-
|
|
16392
|
+
// avoid modification of not normalized value
|
|
16393
|
+
var value = this.get_value();
|
|
16394
|
+
var prev_value = this.field.get_client(this.record);
|
|
16395
|
+
if (value == this._normalize_newline(prev_value)) {
|
|
16396
|
+
value = prev_value;
|
|
16397
|
+
}
|
|
16398
|
+
this.field.set_client(this.record, value);
|
|
16399
|
+
},
|
|
16400
|
+
_normalize_newline: function(content) {
|
|
16401
|
+
return content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
16388
16402
|
},
|
|
16389
16403
|
set_readonly: function(readonly) {
|
|
16390
16404
|
Sao.View.Form.Text._super.set_readonly.call(this, readonly);
|