mirror of
https://github.com/bringout/oca-ocb-mrp.git
synced 2026-04-27 01:12:06 +02:00
19.0 vanilla
This commit is contained in:
parent
accf5918df
commit
6e65e8c877
688 changed files with 225434 additions and 199401 deletions
|
|
@ -0,0 +1,18 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class StockReplenishMixin(models.AbstractModel):
|
||||
_inherit = 'stock.replenish.mixin'
|
||||
|
||||
bom_id = fields.Many2one('mrp.bom', string="Bill of Material")
|
||||
show_bom = fields.Boolean(compute='_compute_show_bom')
|
||||
|
||||
@api.depends('route_id')
|
||||
def _compute_show_bom(self):
|
||||
for rec in self:
|
||||
rec.show_bom = rec._get_show_bom(rec.route_id)
|
||||
|
||||
def _get_show_bom(self, route):
|
||||
return any(r.action == 'manufacture' for r in route.rule_ids)
|
||||
Loading…
Add table
Add a link
Reference in a new issue