解除屏蔽
This commit is contained in:
@@ -1649,12 +1649,12 @@ class MrpProduction(models.Model):
|
|||||||
print('申请编程')
|
print('申请编程')
|
||||||
if len(self) > 1:
|
if len(self) > 1:
|
||||||
raise UserError('仅支持选择单个制造订单进行编程申请,请重新选择')
|
raise UserError('仅支持选择单个制造订单进行编程申请,请重新选择')
|
||||||
# problem_productions = []
|
problem_productions = []
|
||||||
for production in self:
|
for production in self:
|
||||||
if production.state not in ['待排程', '待加工'] or production.programming_state != '已编程':
|
if production.state not in ['待排程', '待加工'] or production.programming_state != '已编程':
|
||||||
problem_productions.append(production.name)
|
problem_productions.append(production.name)
|
||||||
# if problem_productions:
|
if problem_productions:
|
||||||
# raise UserError('以下制造订单状态或编程状态不符合要求: %s' % ', '.join(problem_productions))
|
raise UserError('制造订单%s的状态(仅限待排程、待加工)或编程状态(仅限已编程)不符合要求,请检查!' % ' '.join(problem_productions))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'type': 'ir.actions.act_window',
|
'type': 'ir.actions.act_window',
|
||||||
|
|||||||
Reference in New Issue
Block a user