From 63ca6f58562635e6f66436b5ebd650f15beba672 Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Tue, 14 Jan 2025 08:33:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E9=99=A4=E7=8A=B6=E6=80=81=E9=99=90?= =?UTF-8?q?=E5=88=B6=E5=B1=8F=E8=94=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_production.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index 25ad34b4..43c2a4a5 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -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',