diff options
| author | Anh Thao Pham (pta) <pta@odoo.com> | 2020-07-22 07:51:55 +0000 |
|---|---|---|
| committer | Anh Thao Pham (pta) <pta@odoo.com> | 2020-07-31 14:44:58 +0000 |
| commit | cea6cb71832e0eea2ef0c721b53543fa82c1dbb2 (patch) | |
| tree | fb283280d462bfa07874f136c7473818a6a5ca6e /addons/mail/static/src/models/thread_cache | |
| parent | 9213cd35080af8af084e800d78e632f26e5ce155 (diff) | |
[FIX] base: fix create option of import for Many2one in One2many
- Install Inventory
- Create an excel file with the following values :
--------------------------------------------------------------------------------------------------------------------------------------------------------
location_id | location_dest_id | Operation Type / database ID | Stock moves / product | Stock moves / unit of measure | Stock moves / name
--------------------------------------------------------------------------------------------------------------------------------------------------------
Partner Locations/Vendors | WH/Stock | 1 | Non existent product | Units | Test
--------------------------------------------------------------------------------------------------------------------------------------------------------
- Go to Inventory > Operations > Transfers and import the file
- Check the "Create if doesn't exist" option for "Stock moves / Product" and click on "TEST" button
Import fails because Product does not exist and is not created.
"name_create_enabled_fields" is used in frontend to store which fields have to be created if they don't exist.
The issue comes from the fact that the keys used in "name_create_enabled_fields" contain
the full path to the related field (i.e. move_lines/product_id), but only the final field name is used
when checking "name_create_enabled_fields" in the backend (i.e. product_id).
The prefix from the keys in "name_create_enabled_fields" should be removed when parsing fields from One2many.
opw-2282087
X-original-commit: fadce5c117e3a14ec659cf0accee85502214120d
Diffstat (limited to 'addons/mail/static/src/models/thread_cache')
0 files changed, 0 insertions, 0 deletions
