sf-工厂取消接单-坯料的制造订单未取消

This commit is contained in:
mgw
2025-02-26 09:40:18 +08:00
parent 2a8791b9a9
commit dca6f9fb53
3 changed files with 20 additions and 5 deletions

View File

@@ -275,9 +275,9 @@ class MrpProduction(models.Model):
@api.onchange('product_id')
def onchange_product_id(self):
for record in self:
if record.product_id.categ_id.type == '成品':
if record.product_id.categ_id.name == '成品':
record.production_product_type = '成品'
elif record.product_id.categ_id.type == '坯料':
elif record.product_id.categ_id.name == '坯料':
record.production_product_type = '坯料'
else:
record.production_product_type = '其他'