Kirti Savalia(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-889093-ksa into
lp:openobject-addons.
Requested reviews:
Rucha (Open ERP) (rpa-openerp)
Related bugs:
Bug #889093 in OpenERP Addons: "stock real time accounting - wrong values for
stock moves with purchase unit != UoM"
https://bugs.launchpad.net/openobject-addons/+bug/889093
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-889093-ksa/+merge/82513
in stock real time accounting wrong values for stock moves with purchase unit.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-889093-ksa/+merge/82513
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-889093-ksa.
=== modified file 'purchase/stock.py'
--- purchase/stock.py 2011-11-13 16:07:32 +0000
+++ purchase/stock.py 2011-11-17 11:06:24 +0000
@@ -35,16 +35,12 @@
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()
_______________________________________________
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