Use translated values when exporting Reference and Selection fields
issue6961 review37841002
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
* Use translated values when exporting Reference and Selection fields
|
||||
|
||||
Version 4.6.0 - 2017-10-30
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Allow to export model and record name of Reference fields
|
||||
|
||||
+10
-1
@@ -1328,8 +1328,17 @@
|
||||
this.context = context;
|
||||
Sao.Window.Export._super.init.call(this,
|
||||
Sao.i18n.gettext('Export to CSV')).then(function() {
|
||||
var fields = this.screen.model.fields;
|
||||
names.forEach(function(name) {
|
||||
this.sel_field(name);
|
||||
var type = fields[name].description.type;
|
||||
if (type == 'selection') {
|
||||
this.sel_field(name + '.translated');
|
||||
} else if (type == 'reference') {
|
||||
this.sel_field(name + '.translated');
|
||||
this.sel_field(name + '/rec_name');
|
||||
} else {
|
||||
this.sel_field(name);
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user