[Openerp-community-reviewer] [Bug 1329342] Re: stock.fill.inventory doesn't consider all the records
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 = 1 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, 1, 2, etc. so move_ids will be all_move_ids[0:1], all_move_ids[1:10001], all_move_ids[2:20001] 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
[Openerp-community-reviewer] [Bug 1329342] Re: stock.fill.inventory doesn't consider all the records
No, it seems there is a logical error in the algoritm: Current implementation: for i in range(0, 25, 5): ... print %s:%s % (i * 5, (i+1) * 5) ... 0:5 25:30 50:55 75:80 100:105 Suggested fix: for i in range(0, 25, 5): ... print %s:%s % (i,i + 5) ... 0:5 5:10 10:15 15:20 20:25 ** Changed in: ocb-addons Status: Invalid = Confirmed -- 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): Confirmed Bug description: rev 10204 introduce this bad loop: MAX_IMPORT_LINES = 1 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, 1, 2, etc. so move_ids will be all_move_ids[0:1], all_move_ids[1:10001], all_move_ids[2:20001] 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
[Openerp-community-reviewer] [Bug 1329342] Re: stock.fill.inventory doesn't consider all the records
** Changed in: ocb-addons Status: Fix Committed = Fix Released -- 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): Fix Released Bug description: rev 10204 introduce this bad loop: MAX_IMPORT_LINES = 1 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, 1, 2, etc. so move_ids will be all_move_ids[0:1], all_move_ids[1:10001], all_move_ids[2:20001] 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