坯料自加工的切割工序状态也判断了编程状态
This commit is contained in:
@@ -265,6 +265,23 @@ class MrpProduction(models.Model):
|
||||
|
||||
part_name = fields.Char(string='零件名称', related='product_id.part_name', readonly=True)
|
||||
|
||||
# 判断制造的产品类型
|
||||
production_product_type = fields.Selection([
|
||||
('成品', '成品'),
|
||||
('坯料', '坯料'),
|
||||
('其他', '其他')
|
||||
], string='产品类型', default='成品')
|
||||
|
||||
@api.onchange('product_id')
|
||||
def onchange_product_id(self):
|
||||
for record in self:
|
||||
if record.product_id.categ_id.type == '成品':
|
||||
record.production_product_type = '成品'
|
||||
elif record.product_id.categ_id.type == '坯料':
|
||||
record.production_product_type = '坯料'
|
||||
else:
|
||||
record.production_product_type = '其他'
|
||||
|
||||
@api.depends('product_id.manual_quotation')
|
||||
def _compute_manual_quotation(self):
|
||||
for item in self:
|
||||
|
||||
Reference in New Issue
Block a user