diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index 5f1f51b6..06e452d3 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -1651,7 +1651,7 @@ class MrpProduction(models.Model): raise UserError('仅支持选择单个制造订单进行编程申请,请重新选择') problem_productions = [] for production in self: - if production.state not in ['待排程', '待加工'] or production.programming_state != '已编程': + if production.state not in ['confirmed', 'pending_cam'] or production.programming_state != '已编程': problem_productions.append(production.name) if problem_productions: raise UserError('制造订单%s的状态(仅限待排程、待加工)或编程状态(仅限已编程)不符合要求,请检查!' % ' '.join(problem_productions))