Merge lp:~openerp-dev/openobject-addons/trunk-bug-889093-ksa into lp:openobject-addons

Proposed by Kirti Savalia(OpenERP)
Status: Merged
Approved by: Raphael Collet (OpenERP)
Approved revision: 5732
Merge reported by: Raphael Collet (OpenERP)
Merged at revision: not available
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-889093-ksa
Merge into: lp:openobject-addons
Diff against target: 21 lines (+1/-5)
1 file modified
purchase/stock.py (+1/-5)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-889093-ksa
Reviewer Review Type Date Requested Status
Rucha (Open ERP) (community) Approve
qdp (OpenERP) Pending
Review via email: mp+82513@code.launchpad.net

Description of the change

in stock real time accounting wrong values for stock moves with purchase unit.

To post a comment you must log in.
Revision history for this message
Rucha (Open ERP) (rpa-openerp) :
review: Approve
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

For the record, this patch is superseded by the patch for bug 923191

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'purchase/stock.py'
2--- purchase/stock.py 2011-11-13 16:07:32 +0000
3+++ purchase/stock.py 2011-11-17 11:11:23 +0000
4@@ -35,16 +35,12 @@
5 on the purchase order in case the valuation data was not directly specified during picking
6 confirmation.
7 """
8- product_uom_obj = self.pool.get('product.uom')
9-
10 reference_amount, reference_currency_id = super(stock_move, self)._get_reference_accounting_values_for_valuation(cr, uid, move, context=context)
11- default_uom = move.product_id.uom_id.id
12- qty = product_uom_obj._compute_qty(cr, uid, move.product_uom.id, move.product_qty, default_uom)
13 if move.product_id.cost_method != 'average' or not move.price_unit:
14 # no average price costing or cost not specified during picking validation, we will
15 # plug the purchase line values if they are found.
16 if move.purchase_line_id and move.picking_id.purchase_id.pricelist_id:
17- reference_amount, reference_currency_id = move.purchase_line_id.price_unit * qty, move.picking_id.purchase_id.pricelist_id.currency_id.id
18+ reference_amount, reference_currency_id = move.purchase_line_id.price_unit * move.product_qty, move.picking_id.purchase_id.pricelist_id.currency_id.id
19 return reference_amount, reference_currency_id
20
21 stock_move()

Subscribers

People subscribed via source and target branches

to all changes: