Commit a30ebab4 by 夏超

[fix] 修改问题

parent b8d68039
......@@ -71,11 +71,11 @@ class InheritWorkOrder(models.Model):
elif not previous and judge:
return 1
if "切割" in previous.process_id.name:
if "切割" in previous.process_id.name and self.task_id and previous.task_id:
previous_multiple = previous.task_id.spare_parts_qty / self.task_id.plan_qty
elif "压铆" in previous.process_id.name:
elif "压铆" in previous.process_id.name and self.task_id:
previous_multiple = previous.task_id.press_riveting_qty / self.task_id.plan_qty
elif "折弯" in previous.process_id.name:
elif "折弯" in previous.process_id.name and self.task_id:
previous_multiple = previous.task_id.bending_qty / self.task_id.plan_qty
else:
previous_multiple = previous.routing_line_id.multiple
......
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