[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
This commit is contained in:
Nicolas Lempereur
2016-01-28 17:27:18 +01:00
parent fd038801c0
commit 29be9ae80b
+1
View File
@@ -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));