优化制造订单菜单
This commit is contained in:
@@ -102,6 +102,9 @@ class MrpProduction(models.Model):
|
||||
elif not production.workorder_ids and float_compare(production.qty_producing, production.product_qty,
|
||||
precision_rounding=production.product_uom_id.rounding) >= 0:
|
||||
production.state = 'to_close'
|
||||
elif any(
|
||||
wo.test_results == '返工' and wo.state == 'done' for wo in production.workorder_ids):
|
||||
production.state = 'rework'
|
||||
elif any(wo_state in ('progress', 'done') for wo_state in production.workorder_ids.mapped('state')):
|
||||
production.state = 'progress'
|
||||
elif production.product_uom_id and not float_is_zero(production.qty_producing,
|
||||
|
||||
Reference in New Issue
Block a user