tryton-sao 6.6.0 → 6.6.1
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 +21 -7
- 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/src/window.js +3 -3
- package/locale/hu_HU.json +0 -1
- package/locale/it_IT.json +0 -1
- package/locale/ja_JP.json +0 -1
- package/locale/pt_BR.json +0 -1
package/CHANGELOG
CHANGED
package/dist/tryton-sao.js
CHANGED
|
@@ -3991,9 +3991,12 @@ var Sao = {
|
|
|
3991
3991
|
};
|
|
3992
3992
|
|
|
3993
3993
|
var evaluator;
|
|
3994
|
-
|
|
3994
|
+
var type_ = field.description.type;
|
|
3995
|
+
if (type_ == 'reference') {
|
|
3995
3996
|
var allowed_models = field.get_models(record);
|
|
3996
3997
|
evaluator = _model_evaluator(allowed_models);
|
|
3998
|
+
} else if (type_ == 'multiselection') {
|
|
3999
|
+
return;
|
|
3997
4000
|
} else {
|
|
3998
4001
|
evaluator = _value_evaluator;
|
|
3999
4002
|
}
|
|
@@ -16607,15 +16610,26 @@ function eval_pyson(value){
|
|
|
16607
16610
|
},
|
|
16608
16611
|
get modified() {
|
|
16609
16612
|
if (this.record && this.field) {
|
|
16610
|
-
|
|
16613
|
+
var value = this._normalize_newline(
|
|
16614
|
+
this.field.get_client(this.record));
|
|
16615
|
+
return value != this.get_value();
|
|
16611
16616
|
}
|
|
16612
16617
|
return false;
|
|
16613
16618
|
},
|
|
16614
16619
|
get_value: function() {
|
|
16615
|
-
return this.input.val() || '';
|
|
16620
|
+
return this._normalize_newline(this.input.val() || '');
|
|
16616
16621
|
},
|
|
16617
16622
|
set_value: function() {
|
|
16618
|
-
|
|
16623
|
+
// avoid modification of not normalized value
|
|
16624
|
+
var value = this.get_value();
|
|
16625
|
+
var prev_value = this.field.get_client(this.record);
|
|
16626
|
+
if (value == this._normalize_newline(prev_value)) {
|
|
16627
|
+
value = prev_value;
|
|
16628
|
+
}
|
|
16629
|
+
this.field.set_client(this.record, value);
|
|
16630
|
+
},
|
|
16631
|
+
_normalize_newline: function(content) {
|
|
16632
|
+
return content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
16619
16633
|
},
|
|
16620
16634
|
set_readonly: function(readonly) {
|
|
16621
16635
|
Sao.View.Form.Text._super.set_readonly.call(this, readonly);
|
|
@@ -25912,8 +25926,8 @@ function eval_pyson(value){
|
|
|
25912
25926
|
'model.' + this.screen.model_name +
|
|
25913
25927
|
'.export_data_domain'),
|
|
25914
25928
|
'params': [
|
|
25915
|
-
domain, fields,
|
|
25916
|
-
|
|
25929
|
+
domain, fields, offset, limit, this.screen.order,
|
|
25930
|
+
header, this.context],
|
|
25917
25931
|
}, this.session);
|
|
25918
25932
|
}
|
|
25919
25933
|
prm.then(data => {
|
|
@@ -25925,7 +25939,7 @@ function eval_pyson(value){
|
|
|
25925
25939
|
this.destroy();
|
|
25926
25940
|
}
|
|
25927
25941
|
},
|
|
25928
|
-
export_csv: function(
|
|
25942
|
+
export_csv: function(data, paths) {
|
|
25929
25943
|
var locale_format = this.el_csv_locale.prop('checked');
|
|
25930
25944
|
var unparse_obj = {};
|
|
25931
25945
|
unparse_obj.data = data.map(function(row, i) {
|