diff --git a/sale_order_add_bom/mrp_bom.py b/sale_order_add_bom/mrp_bom.py index 527216f..a267c2a 100644 --- a/sale_order_add_bom/mrp_bom.py +++ b/sale_order_add_bom/mrp_bom.py @@ -1,12 +1,13 @@ # -*- coding: utf-8 -*- -# © 2016 Akretion (Alexis de Lattre ) +# Copyright 2016-2019 Akretion France +# @author: Alexis de Lattre # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from openerp import models, fields +from odoo import models, fields class MrpBom(models.Model): _inherit = 'mrp.bom' _rec_name = 'product_id' - sale_ok = fields.Boolean(related='product_id.sale_ok', store=True, compute_sudo=True) + sale_ok = fields.Boolean(related='product_tmpl_id.sale_ok', store=True) diff --git a/sale_order_add_bom/wizard/sale_add_phantom_bom_view.xml b/sale_order_add_bom/wizard/sale_add_phantom_bom_view.xml index dff5025..4899d0f 100644 --- a/sale_order_add_bom/wizard/sale_add_phantom_bom_view.xml +++ b/sale_order_add_bom/wizard/sale_add_phantom_bom_view.xml @@ -13,7 +13,7 @@
- +