[FIX] stock: Perf, move order by picking_id

It will force a JOIN between stock_move and stock_picking
table. That could cost a lot on huge databases.
This commit is contained in:
Arnold Moyaux
2019-02-11 14:58:34 +00:00
parent 4960453db9
commit 333b3caa19
+1 -1
View File
@@ -19,7 +19,7 @@ PROCUREMENT_PRIORITIES = [('0', 'Not urgent'), ('1', 'Normal'), ('2', 'Urgent'),
class StockMove(models.Model):
_name = "stock.move"
_description = "Stock Move"
_order = 'picking_id, sequence, id'
_order = 'sequence, id'
def _default_group_id(self):
if self.env.context.get('default_picking_id'):