From 8fb70db8a02d211db6e7dc8a4dc189474fc94d1c Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 14 Feb 2012 19:43:31 +0100 Subject: [PATCH] [IMP] better index, on behalf of ferdinand, bug 571203 bzr revid: fp@tinyerp.com-20120214184331-w7yrj6ejuengvwou --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index f3cdffe..d538dfb 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1712,7 +1712,7 @@ class stock_move(osv.osv): WHERE indexname = \'stock_move_location_id_location_dest_id_product_id_state\'') if not cursor.fetchone(): cursor.execute('CREATE INDEX stock_move_location_id_location_dest_id_product_id_state \ - ON stock_move (location_id, location_dest_id, product_id, state)') + ON stock_move (product_id, state, location_id, location_dest_id)') return res def onchange_lot_id(self, cr, uid, ids, prodlot_id=False, product_qty=False, -- 1.7.10.4