This question has been flagged
2332 Views

Ok, here is the deal !

I have import data from my previous ERP using CSV files. I have import suppliers, tags, categories, and all products.

So far, so good.

Now I met an issue for every import using product external ID (i.e. inventory and order point).

First message return Missing Error exception between line 2 and 10320 of my csv file which is not really helpfull.

After investigation, I finally discovered that external IDs are not related to product_template table like indicate in ir_model_data table (field res_id indicate product.template), but they are looking for records in product_product instead which of course don't have the same ID.

I discovered this issue when trying to import order point list. Message was finaly much more explicit:

ERREUR: une instruction insert ou update sur la table « stock_warehouse_orderpoint » viole la contrainte de clé étrangère « stock_warehouse_orderpoint_product_id_fkey » DETAIL: La clé (product_id)=(20664) n'est pas présente dans la table « product_product ». à la ligne 72

Sorry message is in French, but we can see that my external product ID is looking for pk of product_product instead of product_template.

 

My Odoo release: 9.0c-20161117


Is there any fix of this issue ?


Avatar
Discard