diff --git a/addons/mrp/models/mrp_routing.py b/addons/mrp/models/mrp_routing.py index 6ab251f46f9..5e217cb5ee6 100644 --- a/addons/mrp/models/mrp_routing.py +++ b/addons/mrp/models/mrp_routing.py @@ -75,7 +75,7 @@ class MrpRoutingWorkcenter(models.Model): ('qty_produced', '>', 0), ('state', '=', 'done')], limit=operation.time_mode_batch, - order="date_finished desc, id") + order="date_finished desc, id desc") # To compute the time_cycle, we can take the total duration of previous operations # but for the quantity, we will take in consideration the qty_produced like if the capacity was 1. # So producing 50 in 00:10 with capacity 2, for the time_cycle, we assume it is 25 in 00:10