sale_order_line.py 542 B

1234567891011121314151617
  1. # -*- encoding: utf-8 -*-
  2. # Copyright 2020 Akretion Renato Lima <renato.lima@akretion.com.br>
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
  4. from openerp import models, fields, api, _
  5. class SaleOrderLine(models.Model):
  6. _inherit = 'sale.order.line'
  7. bom_id = fields.Many2one(
  8. comodel_name='mrp.bom',
  9. string='BOM',
  10. domain="[('product_tmpl_id.product_variant_ids', '=', product_id),"
  11. "'|', ('product_id', '=', product_id), "
  12. "('product_id', '=', False)]",
  13. )