Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
41 Lượt xem

I'm currently importing products into Odoo 18, followed by a Bill of Materials (BoM) import using External IDs. However, I'm encountering the following error:

"Invalid external ID import.400034: expected model 'product.product', found 'product.template'"

What I’ve Tried

  • When importing products, Odoo correctly creates product.template records.
  • According to the official documentation and community threads (e.g., -->odoo.com/forum/help-1/producttemplate-vs-productproduct-94430), a corresponding product.product should be automatically generated for each template.
  • However, in my case, this automatic creation doesn't seem to happen — or at least it's not visible for linking via external ID.

Troubleshooting Steps Attempted

  1. Re-exported the products after import to check for the product.product external IDs — but only product.template entries are exported. External IDs are the one I set (__import__.XXXX)
  2. Tried importing with and without enabling variants — the result is the same.
  3. Verified that the product shows up in the UI, but BoM import still fails due to the mismatch in expected model.


  • Why is the product.product record not being generated or not linked via external ID?
  • How can I correctly import BoMs using external IDs that reference the product variant (product.product) instead of just the template?

I've scouted the depth of the internet to find a solution, there are no clear answer. ChatGPT 4.5 is as lost as I am.

What is the correct way to import product and bom, I can't link by name as there duplicated names with different ids, those are data extracted from SAP with over 10'000 products and 30'000 bom entries.


Any clarification or recommended workflow would be appreciated.



Ảnh đại diện
Huỷ bỏ

It would probably be beneficial if you'd add a trimmed down version of your import files showing the header and relevant data for an example dataset.

Tác giả Câu trả lời hay nhất

Hi Christoph,

Thank you, the missing part was to export with the Product_variant_ids/id column as you put in your screenshot.

It seem easier to import variants directly, you mentioned " if this works for your product structure", what are are the drawback of doing so ?

Ảnh đại diện
Huỷ bỏ

Unless you're using Product Templates with actual Variants (1 Template with Attributes that lead to variations of that Product) it doesn't matter at all. Otherwise it might be a bit of hassle to actually create Variants that belong together.

Câu trả lời hay nhất

In general, there can't be a product.template without at least one product.product (Product Variant) assigned to it - even if there are no Attributes involved at the Product Template creation. However, if you actually import Product Templates with an External ID, this ID is not the same as the external ID of the Product Variant as it is stored as a separate record. You will have to explicitly export your Product Variants, or add the Variants' external IDs to the Product Template export:


Highlighted in yellow, this is the data Odoo expects you to use when importing Variant-specific data in a second step:


This is, because a Product Template is not specific enough (for example due to Attributes) and only the actual Product Variant defines what 'real' Product to deal with.


You can however also directly import Product Variants, rather than Product Templates, if this works for your product structure. This way, the external ID given to a line is already the one you will need for importing BOM lines (just ensure you have Product Variants enabled in the Settings to see that Menu point i.e. in Manufacturing -> Products -> Product Variants)


Ảnh đại diện
Huỷ bỏ