Commit 0cb34305 by 夏超

[fix] 东联同步功能优化

parent c8445a66
...@@ -138,7 +138,7 @@ class InheritProductionTask(models.Model): ...@@ -138,7 +138,7 @@ class InheritProductionTask(models.Model):
self.write({ self.write({
"work_order_ids": self.change_routing_id_work_order(routing_id) "work_order_ids": self.change_routing_id_work_order(routing_id)
}) })
else: elif not self.routing_id.state == "确认":
routing_id = self.routing_id.copy() routing_id = self.routing_id.copy()
routing_id.update({ routing_id.update({
"name": f"{routing_id.name}" "name": f"{routing_id.name}"
...@@ -148,6 +148,8 @@ class InheritProductionTask(models.Model): ...@@ -148,6 +148,8 @@ class InheritProductionTask(models.Model):
self.write({ self.write({
"work_order_ids": self.change_routing_id_work_order(routing_id) "work_order_ids": self.change_routing_id_work_order(routing_id)
}) })
else:
routing_id = self.routing_id
return { return {
"name": f"工艺设计({self.code})", "name": f"工艺设计({self.code})",
"type": "ir.actions.client", "type": "ir.actions.client",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment