Skip to Content
Menu
This question has been flagged
1 Reply
3436 Views

Hi,


I want to display the BOMs related to a product in the sale order line like so :

https://imgur.com/a/v6oF6BG

I've tried this :

bom_id = fields.Many2one("mrp.bom",string="Bill Of Material")

OR

bom_id = fields.Many2one("mrp.bom", related"product_id.bom_id.product_tmpl_id", string="Bill Of Material")

OR


bom_id = fields.One2Many("mrp.bom", "product_id", string="Bill Of Material")


Any idea ? Thanks in advance

Avatar
Discard
Author Best Answer

Managed to solve it myself :


bom_id = fields.Many2one("mrp.bom", related='product_id.bom_id', string="Bill Of Material")
Avatar
Discard

Hi cavailles, if you want select the bom in order line and create a manufacturing order as selected bom then below apps might be useful for you.

https://apps.odoo.com/apps/modules/13.0/eq_sale_bom_mrp/

Thanks.

Related Posts Replies Views Activity
1
Sep 20
1846
1
Apr 22
1764
2
Jan 24
707
1
Jan 20
3294
0
Feb 19
2729