Skip to content
Snippets Groups Projects
Commit 2db6df27 authored by jvm-odoo's avatar jvm-odoo
Browse files

[FIX] web: fix exporting a saved export


Issue

	- Install Sales
	- Sales > Product
	- Select a line > Export
	- Choose import-export compatible
	- Keep only ID & Name
	- Select Product Category > Name
	- Save the export
	- Export

	If you look at the file everything is ok,
	categ_id = the name of the category

	- Close the modal
	- Reselect a line > Export
	- Choose your saved export
	- Export

	Now the categ_id is not the name but the id

Cause

	In 12.0 before you unfold a many2one or many2many, you have for example
	these menu and corresponding fields:

	"Product Category": {id=> categ_id, value=> categ_id/id}

	and once you unfold it:

	"Product Category": {id=> categ_id, value=> categ_id}
	"Product Category/External ID": {id=> categ_id/id, value=> categ_id/id}
	"Product Category/Name": {id=> categ_id, value=> categ_id}

	So if you select your saved list and the m2o is not unfolded, it will
	take the id one, if it's unfolded, it will take the first categ_id

Solution

	Add /id for the m2o and m2m fields, to have
	"Product Category": {id=> categ_id/id, value=> categ_id/id}

	So as categ_id/id is not categ_id, it will looks for
	the right field, the name.

OPW-2243477

closes odoo/odoo#50301

Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
parent 93377cc4
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment