Amit Parik (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-981506-amp into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #981506 in OpenERP Addons: "wrong inventory computation if location_id 
and location_dest_id are identical"
  https://bugs.launchpad.net/openobject-addons/+bug/981506

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-981506-amp/+merge/102053

Hello,

Import inventory wizard doesn't check the source and destination location are 
same on stock move.
This fixed is solved this problem. For more information please look the video 
on lp:981506

Thank you!
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-981506-amp/+merge/102053
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-981506-amp.
=== 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-04-16 05:59:21 +0000
@@ -97,7 +97,9 @@
             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:
+                if  move.location_dest_id.id == move.location_id.id :
+                    qty = 0.0
+                elif 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)

_______________________________________________
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