[FIX] stock: avoid non-deterministic order for location

Stock.location is ordered by "complete_name" which is possible to be the
same (i.e. default production locations for different companies). This
may result non-deterministic order. Add "id" to avoid it.

closes odoo/odoo#79181

X-original-commit: 94a8ad3fae914b046064bb7ce17572be8280f6e0
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit is contained in:
yhu-odoo
2021-10-29 11:05:56 +00:00
parent 5ab17ff395
commit 9040bf33b5
+1 -1
View File
@@ -17,7 +17,7 @@ class Location(models.Model):
_description = "Inventory Locations"
_parent_name = "location_id"
_parent_store = True
_order = 'complete_name'
_order = 'complete_name, id'
_rec_name = 'complete_name'
_check_company_auto = True