Merge lp:~openerp-dev/openobject-addons/7.0-opw-593948-dhr into lp:openobject-addons/7.0

Proposed by Dharti Ratani(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-593948-dhr
Merge into: lp:openobject-addons/7.0
Diff against target: 20 lines (+2/-1)
1 file modified
stock/stock.py (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-593948-dhr
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+171035@code.launchpad.net

Description of the change

Hello Sir,

Corrected the calculation for the amount of debit and credit in a stock journal entry for a product with average costing method.

Steps to produce:

Define two products s1 and s2 both with real time valuation. In s1, I used standard price (EUR 3.75) for cost method, and in s2 I used average price (EUR 3.75). The default unit of measure for both s1 and s2 is gram, and the purchase unit of measure is kg.Purchas one kg of each product and receive the shipments. The corresponding (in shipment) journal entry for s1 shows the correct value of 3750.0 while that of s2 shows 3750000.0. Purchase is done in USD while the currency of the company is EUR. The rate is (1 USD = 3.75 EUR). All other journal entries (invoice and payment) are correct.

To post a comment you must log in.
9265. By Dharti Ratani(OpenERP)

[MERGE]Merge with 7.0

9266. By Dharti Ratani(OpenERP)

[IMP]Fixed the issue of wrong amount in debit credit in stock journal entries for second move when processing the shipment partially

9267. By Dharti Ratani(OpenERP)

[MERGE]Merged with latest 7.0

Unmerged revisions

9267. By Dharti Ratani(OpenERP)

[MERGE]Merged with latest 7.0

9266. By Dharti Ratani(OpenERP)

[IMP]Fixed the issue of wrong amount in debit credit in stock journal entries for second move when processing the shipment partially

9265. By Dharti Ratani(OpenERP)

[MERGE]Merge with 7.0

9264. By Dharti Ratani(OpenERP)

[FIX]Fixed the price unit for stock journal entries for a product with average costing method

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/stock.py'
2--- stock/stock.py 2014-01-22 13:38:22 +0000
3+++ stock/stock.py 2014-01-27 10:41:46 +0000
4@@ -2320,7 +2320,7 @@
5 # if product is set to average price and a specific value was entered in the picking wizard,
6 # we use it
7 if move.product_id.cost_method == 'average' and move.price_unit:
8- reference_amount = qty * move.price_unit
9+ reference_amount = move.product_qty * move.price_unit
10 reference_currency_id = move.price_currency_id.id or reference_currency_id
11
12 # Otherwise we default to the company's valuation price type, considering that the values of the
13@@ -2756,6 +2756,7 @@
14 {
15 'product_qty': move.product_qty - product_qty,
16 'product_uos_qty': move.product_qty - product_qty,
17+ 'price_unit': move.price_unit,
18 'prodlot_id': False,
19 'tracking_id': False,
20 })