Daniel
Daniel

Reputation: 850

Odoo: extends the import function for a specify model

I want to change the Import function of Odoo, for a specify model (in this case, it is mrp_production. Import Function Image

For example, my csv file has 2 columns only: product_id and product_qty.

I want the Bill of Material to be loaded automatically after importing (currently it is empty). I want to customize the Import function for this model only.

Is there anyone do this before? Or please provide some solutions/links on how to do it.

Thank you very much.

Upvotes: 0

Views: 614

Answers (1)

Shikhar S
Shikhar S

Reputation: 319

For this, you simply override the create method for the mrp model and try creating one record from form view. If you have written correct logic to get the BOM automatically it will automatically work while importing.

In, import function odoo basically calls the create method for the model.

Thanks

Upvotes: 1

Related Questions