From 7c2cb8d6593775330560641edd2de302da3913a6 Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Thu, 17 Nov 2011 15:37:52 +0530 Subject: [PATCH] [FIX]:in stock real time accounting wrong values for stock moves with purchase unit lp bug: https://launchpad.net/bugs/889093 fixed bzr revid: ksa@tinyerp.com-20111117100752-774f7kkcfr1wtajg --- addons/purchase/stock.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/purchase/stock.py b/addons/purchase/stock.py index 42d9c40d7e5..c212a171b21 100644 --- a/addons/purchase/stock.py +++ b/addons/purchase/stock.py @@ -35,16 +35,12 @@ class stock_move(osv.osv): on the purchase order in case the valuation data was not directly specified during picking confirmation. """ - product_uom_obj = self.pool.get('product.uom') - reference_amount, reference_currency_id = super(stock_move, self)._get_reference_accounting_values_for_valuation(cr, uid, move, context=context) - default_uom = move.product_id.uom_id.id - qty = product_uom_obj._compute_qty(cr, uid, move.product_uom.id, move.product_qty, default_uom) if move.product_id.cost_method != 'average' or not move.price_unit: # no average price costing or cost not specified during picking validation, we will # plug the purchase line values if they are found. if move.purchase_line_id and move.picking_id.purchase_id.pricelist_id: - reference_amount, reference_currency_id = move.purchase_line_id.price_unit * qty, move.picking_id.purchase_id.pricelist_id.currency_id.id + reference_amount, reference_currency_id = move.purchase_line_id.price_unit * move.product_qty, move.picking_id.purchase_id.pricelist_id.currency_id.id return reference_amount, reference_currency_id stock_move()