Commit 1199c370 by 夏超

[fix] 修改工序判断

parent a7b9201d
...@@ -100,11 +100,11 @@ class InheritProductionTask(models.Model): ...@@ -100,11 +100,11 @@ class InheritProductionTask(models.Model):
res = super(InheritProductionTask, self)._create_work_order_get_values(task, routing_line) res = super(InheritProductionTask, self)._create_work_order_get_values(task, routing_line)
rounding_type = self.env['ir.config_parameter'].sudo().get_param('e_bom.material.demand.rounding', rounding_type = self.env['ir.config_parameter'].sudo().get_param('e_bom.material.demand.rounding',
default="精确计算") default="精确计算")
if routing_line.process_id.name in "切割": if "切割" in routing_line.process_id.name:
plan_qty = task.spare_parts_qty plan_qty = task.spare_parts_qty
elif routing_line.process_id.name in "压铆": elif "压铆" in routing_line.process_id.name:
plan_qty = task.press_riveting_qty plan_qty = task.press_riveting_qty
elif routing_line.process_id.name in "折弯": elif "折弯" in routing_line.process_id.name:
plan_qty = task.bending_qty plan_qty = task.bending_qty
else: else:
plan_qty = task.plan_qty * routing_line.multiple plan_qty = task.plan_qty * routing_line.multiple
...@@ -122,11 +122,11 @@ class InheritProductionTask(models.Model): ...@@ -122,11 +122,11 @@ class InheritProductionTask(models.Model):
""" """
res = super(InheritProductionTask, self)._get_new_work_order_data(routing_line, product, plan_qty, task_type) res = super(InheritProductionTask, self)._get_new_work_order_data(routing_line, product, plan_qty, task_type)
rounding_type = self.env['ir.config_parameter'].sudo().get_param('e_bom.material.demand.rounding', default="精确计算") rounding_type = self.env['ir.config_parameter'].sudo().get_param('e_bom.material.demand.rounding', default="精确计算")
if routing_line.process_id.name in "切割": if "切割" in routing_line.process_id.name:
plan_qty = self.spare_parts_qty plan_qty = self.spare_parts_qty
elif routing_line.process_id.name in "压铆": elif "压铆" in routing_line.process_id.name:
plan_qty = self.press_riveting_qty plan_qty = self.press_riveting_qty
elif routing_line.process_id.name in "折弯": elif "折弯" in routing_line.process_id.name:
plan_qty = self.bending_qty plan_qty = self.bending_qty
else: else:
plan_qty = self.plan_qty * routing_line.multiple plan_qty = self.plan_qty * routing_line.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