openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #07307
[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 = 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
References