diff --git a/sf_sale/models/sale_order.py b/sf_sale/models/sale_order.py index 95999611..b03d761a 100644 --- a/sf_sale/models/sale_order.py +++ b/sf_sale/models/sale_order.py @@ -401,7 +401,7 @@ class RePurchaseOrder(models.Model): artificial_offline = ( workorder.production_id.production_type == '人工线下加工' and workorder.production_id.schedule_state != '已排') auto_production = ( - workorder.production_id.production_type == '自动化产线加工' and workorder.production_id.schedule_state != '已编程') + workorder.production_id.production_type == '自动化产线加工' and workorder.production_id.programming_state != '已编程') if workorder.sequence == min_sequence_wk.sequence: if artificial_offline or auto_production: raise UserError('等待组件')