切割工单隐藏编程相关

This commit is contained in:
mgw
2025-02-26 12:42:42 +08:00
parent fd76863daa
commit 2035dd6857
3 changed files with 8 additions and 8 deletions

View File

@@ -270,10 +270,10 @@ class MrpProduction(models.Model):
('成品', '成品'),
('坯料', '坯料'),
('其他', '其他')
], string='产品类型', default='成品')
], string='产品类型', compute='_compute_production_product_type')
@api.onchange('product_id')
def onchange_product_id(self):
@api.depends('product_id')
def _compute_production_product_type(self):
for record in self:
if record.product_id.categ_id.name == '成品':
record.production_product_type = '成品'