# -*- encoding: utf-8 -*- # Copyright 2020 Akretion Renato Lima # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from openerp import models, fields, api, _ class SaleOrderLine(models.Model): _inherit = 'sale.order.line' bom_id = fields.Many2one( comodel_name='mrp.bom', string='BOM', domain="[('product_tmpl_id.product_variant_ids', '=', product_id)," "'|', ('product_id', '=', product_id), " "('product_id', '=', False)]", )