odoo/odoo — pull request #697 by clonedagain (2014-06-20 15:56:45+00:00)
Title: 7.0 fill inventory oom

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
Patch already adopted in OCB-addons.
First commit used to introduce a regression, but it's fixed.