调整提示词
This commit is contained in:
@@ -1649,12 +1649,9 @@ class MrpProduction(models.Model):
|
||||
print('申请编程')
|
||||
if len(self) > 1:
|
||||
raise UserError('仅支持选择单个制造订单进行编程申请,请重新选择')
|
||||
problem_productions = []
|
||||
for production in self:
|
||||
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))
|
||||
raise UserError('不可操作。所选制造订单必须同时满足如下条件:\n1、制造订单状态:待排程 或 待加工;\n2、制造订单编程状态:已编程。\n请检查!')
|
||||
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
|
||||
Reference in New Issue
Block a user