[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
This commit is contained in:
committed by
Nicolas Martinelli
parent
4cb585ab4f
commit
eaff0a71bd
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user