← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~numerigraphe-team/ocb-addons/7.0-fix-regression-fill-inventory-OOM into lp:ocb-addons

 

Lionel Sausin - Numérigraphe has proposed merging lp:~numerigraphe-team/ocb-addons/7.0-fix-regression-fill-inventory-OOM into lp:ocb-addons.

Requested reviews:
  OpenERP Community Backports (ocb)

For more details, see:
https://code.launchpad.net/~numerigraphe-team/ocb-addons/7.0-fix-regression-fill-inventory-OOM/+merge/223928

Fixes a regression introduced while fixing #1312045 - we were confused and mixed 2 notations, so we skipped stock moves and the results were wrong.
-- 
https://code.launchpad.net/~numerigraphe-team/ocb-addons/7.0-fix-regression-fill-inventory-OOM/+merge/223928
Your team OpenERP Community Backports is requested to review the proposed merge of lp:~numerigraphe-team/ocb-addons/7.0-fix-regression-fill-inventory-OOM into lp:ocb-addons.
=== modified file 'stock/wizard/stock_fill_inventory.py'
--- stock/wizard/stock_fill_inventory.py	2014-05-12 08:27:47 +0000
+++ stock/wizard/stock_fill_inventory.py	2014-06-20 13:46:57 +0000
@@ -111,8 +111,7 @@
             local_context['raise-exception'] = False
             # To avoid running out of memory, process limited batches
             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]
+                move_ids = all_move_ids[i:i+self.MAX_IMPORT_LINES]
                 for move in move_obj.browse(cr, uid, move_ids, context=context):
                     lot_id = move.prodlot_id.id
                     prod_id = move.product_id.id


Follow ups