Commit 5d9b78a4 by 夏超

[fix] 工艺设计

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