Accept Merge Request #1746: (feature/制造功能优化 -> develop)

Merge Request: 解除屏蔽

Created By: @马广威
Accepted By: @马广威
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1746?initial=true
This commit is contained in:
马广威
2025-01-14 08:42:06 +08:00
committed by Coding

View File

@@ -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',