sale_order_add_bom: fix related field definition
This commit is contained in:
committed by
Alexis de Lattre
parent
5a58ae0d9a
commit
9a9459f013
@@ -1,12 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# Copyright 2016-2019 Akretion France
|
||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# 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)
|
||||
|
||||
Reference in New Issue
Block a user