summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2017-01-04 14:44:38 +0100
committerNicolas Lempereur <nle@odoo.com>2017-01-19 16:24:53 +0100
commit734d9b56da5c57900171ee33b7aea3dbc1ece506 (patch)
tree7e3a7e6806cc537d1615bdeb8828a7e2e37a32c3 /addons/web/static/src/js
parentebda1abec40f40580a7da1e511164f0ec77d7a62 (diff)
[FIX] web: conserve /id for saved export list
With 003d85b instead of getting the name of the relation field_relation we get field_relation/id. But the data about the related fields are not gotten all at once when opening the export modal. They are gotten by clicking on the arrow of the related record. So we need to have these /id information saved in the export list, otherwise for example the related records can be missing when exporting from an export list, whilst everything was OK without using the saved export list. With the previous change, an export list could contain an id and .id fields for the same relational field, so a change must also be done in fields_info method used when getting a saved list. opw-665994 opw-693535 note: adapted forward-port of 8.0's 29be9ae80 which was lost when merging web enterprise onto web community.
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/widgets/data_export.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web/static/src/js/widgets/data_export.js b/addons/web/static/src/js/widgets/data_export.js
index 14cdc4c5e3e..8b07fd1f632 100644
--- a/addons/web/static/src/js/widgets/data_export.js
+++ b/addons/web/static/src/js/widgets/data_export.js
@@ -394,6 +394,7 @@ var DataExport = Dialog.extend({
},
add_field: function(field_id, string) {
var $field_list = this.$('.o_fields_list');
+ field_id = this.records[field_id].value || field_id;
if($field_list.find("option[value='" + field_id + "']").length === 0) {
$field_list.append(new Option(string, field_id));
}