解除状态限制屏蔽

This commit is contained in:
mgw
2025-01-14 08:33:34 +08:00
parent 587370fe54
commit 63ca6f5856

View File

@@ -1650,14 +1650,12 @@ class MrpProduction(models.Model):
if len(self) > 1:
raise UserError('仅支持选择单个制造订单进行编程申请,请重新选择')
# problem_productions = []
# for production in self:
# if production.state not in ['待排程', '待加工'] or production.programming_state != '已编程':
# problem_productions.append(production.name)
for production in self:
if production.state not in ['待排程', '待加工'] or production.programming_state != '已编程':
problem_productions.append(production.name)
# if problem_productions:
# raise UserError('以下制造订单状态或编程状态不符合要求: %s' % ', '.join(problem_productions))
# 上述通过后返回一个action id为sf_programming_reason_action用作二次确认wizard显示“重新编程原因XXXXX用户录入注意该制造订单产品已申请重新编程次数为N且当前编程状态为XXX”
cloud_programming = self._cron_get_programming_state()
return {
'type': 'ir.actions.act_window',
'res_model': 'sf.programming.reason',