odoo/odoo — pull request #341 by clonedagain (2014-06-04 13:18:39+00:00)
Title: [IMP]: Due to huge memory usage on browse, slice move_ids into batches

Fixes https://bugs.launchpad.net/ocb-addons/+bug/1312045 : "we're having problems importing an inventory for a location that contains >630000 Stock Moves.
The problem seems to lie in the python loop based on the browse() of the Stock Moves: it preloads too much data and pushes the OS to an out-of-memory condition (which Linux responds to by killing the openerp server)."
This patch solve this bug by splitting stock moves lines ids on separated list of 10.000 lines