Commit 418e3f63 by 夏超

[fix] 东联工艺设计

parent 7f41f896
......@@ -131,6 +131,7 @@ class InheritProductionTask(models.Model):
raise ValidationError("该任务已报工,无法生成新的工艺设计。")
if not self.routing_id:
routing_id = self.env["roke.routing"].create({
"routing_task_id": self.id,
"name": f"{self.product_id.name}" or ""
})
self.write({"routing_id": routing_id.id})
......@@ -141,6 +142,7 @@ class InheritProductionTask(models.Model):
elif self.routing_id.state == "确认":
routing_id = self.routing_id.copy()
routing_id.update({
"routing_task_id": self.id,
"name": f"{routing_id.name}"
})
self.write({"routing_id": routing_id.id})
......
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