[FIX] mrp: additional workorders start without conflict
As additional workorder don't have operation, the cycle computation was wrong and all the start date was set to the same value Task : 2278147
This commit is contained in:
@@ -1160,7 +1160,7 @@ class MrpProduction(models.Model):
|
||||
|
||||
# Instantiate start_date for the next workorder planning
|
||||
if workorder.next_work_order_id:
|
||||
if workorder.operation_id.batch == 'no' or workorder.operation_id.batch_size >= qty_to_produce:
|
||||
if not workorder.operation_id or workorder.operation_id.batch == 'no' or workorder.operation_id.batch_size >= qty_to_produce:
|
||||
start_date = best_finished_date
|
||||
else:
|
||||
cycle_number = float_round(workorder.operation_id.batch_size / best_workcenter.capacity, precision_digits=0, rounding_method='UP')
|
||||
|
||||
Reference in New Issue
Block a user