Hi, this was done on purpose because loading all the records at once brings the server to an out-of-memory condition when there are lots of stock moves involved. So the loop is here to protect from that by processing only a limited number of them at a time.
** Changed in: ocb-addons Status: New => Invalid -- You received this bug notification because you are a member of OpenERP Community Backports, which is subscribed to OpenERP Community Backports (Addons). https://bugs.launchpad.net/bugs/1329342 Title: stock.fill.inventory doesn't consider all the records Status in OpenERP Community Backports (Addons): Invalid Bug description: rev 10204 introduce this bad loop: MAX_IMPORT_LINES = 10000 for i in range(0, len(all_move_ids), self.MAX_IMPORT_LINES): move_ids = all_move_ids[i * self.MAX_IMPORT_LINES: (i + 1) * self.MAX_IMPORT_LINES] i will have the values: 0, 10000, 20000, etc. so move_ids will be all_move_ids[0:10000], all_move_ids[100000000:100010000], all_move_ids[200000000:200010000] etc. suggestion: move_ids = all_move_ids[i:i + self.MAX_RECORDS] To manage notifications about this bug go to: https://bugs.launchpad.net/ocb-addons/+bug/1329342/+subscriptions -- Mailing list: https://launchpad.net/~openerp-community-reviewer Post to : openerp-community-reviewer@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-community-reviewer More help : https://help.launchpad.net/ListHelp