From eaff0a71bda0e66016cab7f8c48c0f75d0692990 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 4 Sep 2018 09:56:53 +0200 Subject: [PATCH] [FIX] web: export field with '/' - Activate lots and SN - Go to Inventory > Inventory Adjustments - Export a record - Select the field 'Inventories > Lot/Serial Number' The `name_get` of the field is exported, not its XMLID. This is because the parsing made in order to limit the depth of export is made on the label, not on the field name. Actually, it is not clear WHY this limitation exists, but we keep it for compatibility purpose. opw-1877092 --- addons/web/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 1ee45befe00..6e9b0046d1f 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1290,7 +1290,7 @@ class Export(http.Controller): 'relation_field': field.get('relation_field')} records.append(record) - if len(name.split('/')) < 3 and 'relation' in field: + if len(id.split('/')) < 3 and 'relation' in field: ref = field.pop('relation') record['value'] += '/id' record['params'] = {'model': ref, 'prefix': id, 'name': name}