多供货方式选择

This commit is contained in:
胡尧
2024-11-11 11:06:56 +08:00
parent 28788e2a81
commit 1b87a81a5a
5 changed files with 17 additions and 8 deletions

View File

@@ -1187,16 +1187,15 @@ class MrpProduction(models.Model):
'user_id': production.user_id.id}
return production_values_str
# 增加制造订单类型
# 增加制造订单类型
production_type = fields.Selection(
[('自动化产线加工', '自动化产线加工'), ('人工线下加工', '人工线下加工')],
string='制造订单类型',
required=True,
string='制造类型',
compute='_compute_production_type',
store=True
)
@api.depends('product_id')
@api.depends('product_id.is_manual_processing')
def _compute_production_type(self):
for production in self:
production.production_type = '自动化产线加工' if not production.product_id.is_manual_processing else '人工线下加工'