切割工单隐藏编程相关
This commit is contained in:
@@ -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 = '成品'
|
||||
|
||||
Reference in New Issue
Block a user