This question has been flagged

Hello, I'm using Odoo 13 Community Edition.


I want to create a many2one field (rohmaterial) in the product_template form view, to add/change/delete one value in the BOM from a product, so in the one2many field (bom_line_ids), depending on the product.


My custom field in product.template.py:

rohmaterial = fields.Many2one(

        'mrp.bom.line', 'Rohmaterial', compute='_compute_rohmaterial', help="Rohmaterial auswählen")


@api.depends('bom_ids')

    def _compute_rohmaterial(self):




Thanks in advance.


Avatar
Discard