Rifakat (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-578768-rha into 
lp:openobject-addons/6.0.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)
Related bugs:
  Bug #898498 in OpenERP Addons: "[6.0.3] Physical inventory - import inventory 
action broken"
  https://bugs.launchpad.net/openobject-addons/+bug/898498
  Bug #1045334 in OpenERP Addons: "import inventory"
  https://bugs.launchpad.net/openobject-addons/+bug/1045334

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-578768-rha/+merge/122630

Hello,

Fixed problem of 'Fill Inventory' wizard which adds qty for dummy moves also,
Ex. Stock -> Stock

If we try to fill inventory for location 'Stock',
It searches for all possible stock movements with location 'Stock' as Source or 
Destination
which includes dummy movement too which results into posting wrong qty moves 
for inventory.

Detail steps are provided in lp:1045334

Please review this fix.

-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-578768-rha/+merge/122630
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-578768-rha.
=== modified file 'stock/wizard/stock_fill_inventory.py'
--- stock/wizard/stock_fill_inventory.py	2012-04-25 12:22:20 +0000
+++ stock/wizard/stock_fill_inventory.py	2012-09-04 08:39:20 +0000
@@ -67,7 +67,6 @@
 
         inventory_line_obj = self.pool.get('stock.inventory.line')
         location_obj = self.pool.get('stock.location')
-        product_obj = self.pool.get('product.product')
         move_obj = self.pool.get('stock.move')
         uom_obj = self.pool.get('product.uom')
         
@@ -88,8 +87,9 @@
             datas = {}
             res[location] = {}
             move_ids = move_obj.search(cr, uid, ['|',('location_dest_id','=',location),('location_id','=',location),('state','=','done')], context=context)
+            moves = [move for move in move_obj.browse(cr, uid, move_ids, context=context) if move.location_id != move.location_dest_id]
 
-            for move in move_obj.browse(cr, uid, move_ids, context=context):
+            for move in moves:
                 lot_id = move.prodlot_id.id
                 prod_id = move.product_id.id
                 if move.location_dest_id.id == location:

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to