Ravish(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-1023816-rmu into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #1023816 in OpenERP Addons: "physical inventory : real quantity is not 
the same as import quantity"
  https://bugs.launchpad.net/openobject-addons/+bug/1023816

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1023816-rmu/+merge/115273

Hello,

When we run a physical inventory, the real quantity in stock in not the same 
that indicate in the import inventory. now working fine with this merge

Thanks..!!!
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1023816-rmu/+merge/115273
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-1023816-rmu.
=== modified file 'stock/wizard/stock_fill_inventory.py'
--- stock/wizard/stock_fill_inventory.py	2011-12-08 05:58:41 +0000
+++ stock/wizard/stock_fill_inventory.py	2012-07-17 06:11:22 +0000
@@ -97,16 +97,17 @@
             for move in move_obj.browse(cr, uid, move_ids, context=context):
                 lot_id = move.prodlot_id.id
                 prod_id = move.product_id.id
-                if move.location_dest_id.id == location:
-                    qty = uom_obj._compute_qty(cr, uid, move.product_uom.id,move.product_qty, move.product_id.uom_id.id)
-                else:
-                    qty = -uom_obj._compute_qty(cr, uid, move.product_uom.id,move.product_qty, move.product_id.uom_id.id)
-
-
-                if datas.get((prod_id, lot_id)):
-                    qty += datas[(prod_id, lot_id)]['product_qty']
-
-                datas[(prod_id, lot_id)] = {'product_id': prod_id, 'location_id': location, 'product_qty': qty, 'product_uom': move.product_id.uom_id.id, 'prod_lot_id': lot_id}
+                if move.location_dest_id.id != move.location_id.id:
+                    if move.location_dest_id.id == location:
+                        qty = uom_obj._compute_qty(cr, uid, move.product_uom.id,move.product_qty, move.product_id.uom_id.id)
+                    else:
+                        qty = -uom_obj._compute_qty(cr, uid, move.product_uom.id,move.product_qty, move.product_id.uom_id.id)
+
+
+                    if datas.get((prod_id, lot_id)):
+                        qty += datas[(prod_id, lot_id)]['product_qty']
+
+                    datas[(prod_id, lot_id)] = {'product_id': prod_id, 'location_id': location, 'product_qty': qty, 'product_uom': move.product_id.uom_id.id, 'prod_lot_id': lot_id}
 
             if datas:
                 flag = True

_______________________________________________
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