From 29be9ae80bd16c828962b239df8bd5c46fa3ebe8 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Wed, 27 Jan 2016 11:36:38 +0100 Subject: [PATCH] [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 which will get us an xmlid instead. But the data about 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. It is in this data that the /id will be appended for the field, but when getting a saved export list, this data may not be available. This commit immediately add the `/id` when a field is put in "Fields to export" column, so this inconsistency is no more. closes #10640 fixes #10327 opw-665994 --- addons/web/static/src/js/data_export.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/src/js/data_export.js b/addons/web/static/src/js/data_export.js index 7a2b902f5c0..4e50d1f780a 100644 --- a/addons/web/static/src/js/data_export.js +++ b/addons/web/static/src/js/data_export.js @@ -368,6 +368,7 @@ instance.web.DataExport = instance.web.Dialog.extend({ }, add_field: function(field_id, string) { var field_list = this.$el.find('#fields_list'); + field_id = this.records[field_id] || field_id; if (this.$el.find("#fields_list option[value='" + field_id + "']") && !this.$el.find("#fields_list option[value='" + field_id + "']").length) { field_list.append(new Option(string, field_id));