odoo/odoo — pull request #4416 by diagramsoftware (2014-12-24 13:10:20+00:00)
Title: [FIX] stock: performance in sale order confirm

When confirming a sale order –in a DB with 194337 rows in `stock_picking` and 1484495 rows in `stock_move`– the function `_picking_assign` is taking too long (~1 minute) when fetching data from `stock.picking` with a condition that includes the fields `location_id` and `location_dest_id`, among others. It can be easily fixed by setting the `store` parameter in both fields.