Skip to content
Snippets Groups Projects
Commit b284285f authored by amoyaux's avatar amoyaux
Browse files

[FIX] mrp: non-deterministic test/ behaviour

test_03_test_serial_number_defaults creates 3 stock.production.lot
but in a test case they have the same create_date.
Moreover this test go through _assign_default_final_lot_id that do
a search on lot ordered by create date. That's why the test is non-
determinisitc since it could pick one of the 3 lots randomly

This commit add the id in the order.
parent d8ae935e
No related branches found
No related tags found
No related merge requests found
......@@ -279,7 +279,7 @@ class MrpWorkorder(models.Model):
def _assign_default_final_lot_id(self):
self.final_lot_id = self.env['stock.production.lot'].search([('use_next_on_work_order_id', '=', self.id)],
order='create_date', limit=1)
order='create_date, id', limit=1)
@api.multi
def record_production(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment