Skip to Content
Menú
This question has been flagged
1 Respondre
4420 Vistes

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
Descartar
Autor Best Answer

Managed to solve it myself :


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

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 Respostes Vistes Activitat
1
de set. 20
2440
1
d’abr. 22
2630
0
de gen. 25
1084
2
de gen. 24
2085
1
de juny 25
4823