Paulius Stundžia
Paulius Stundžia

Reputation: 332

Odoo. How do I force Odoo to create related records on import?

Ok, let's say I'm importing products and they have a brand field (this is from a custom module and it is a many2one relation). A brand has only a name. If I designate a new external id and name for the new brand it won't let me import, because it says it could not find that external id in the db. But how could I just force it to CREATE a brand with that external id? Or am I forced to import brands first and then products?

Upvotes: 1

Views: 1174

Answers (1)

Mariusz Mizgier
Mariusz Mizgier

Reputation: 537

When using import you are expected to provide external id (xmlid of the record) or database id (real id from db) - first you have to create records to add a reference to them.

Upvotes: 1

Related Questions