Merge lp:~openerp-dev/openobject-addons/6.1-opw-579984-WrongUnitPrice-skh into lp:openobject-addons/6.1

Proposed by Somesh Khare
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-579984-WrongUnitPrice-skh
Merge into: lp:openobject-addons/6.1
Diff against target: 16 lines (+4/-3)
1 file modified
account/account_invoice.py (+4/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-579984-WrongUnitPrice-skh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+128239@code.launchpad.net

Description of the change

Hello Sir,

[FIX]account_invoice: Unit price of the product will be wrong in invoice line when the default UOM will be of type bigger.

Note: Check this issue in Web client.
Steps:
1. Create a product and set the default UOM as "tonne" and with sale price 100.
2. Create a Invoice and select the product and see the Unit price of the product it will be 100000.
It should be 100 because the UOM of the product is tonne.

This branch fixes this issue, Kindly review the branch and please share your views in it.

Thanks,
Somesh Khare

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as not reproducible on Trunk . If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

7015. By Somesh Khare

[FIX]account_invoice: Unit price of the product will be wrong in invoice line when the default UOM will be of type bigger (Case: ref 579984)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py 2012-08-20 15:52:57 +0000
+++ account/account_invoice.py 2012-10-05 12:42:24 +0000
@@ -1404,9 +1404,10 @@
1404 res_final['value']['price_unit'] = new_price1404 res_final['value']['price_unit'] = new_price
14051405
1406 if uom:1406 if uom:
1407 uom = self.pool.get('product.uom').browse(cr, uid, uom, context=context)1407 uom_obj = self.pool.get('product.uom')
1408 if res.uom_id.category_id.id == uom.category_id.id:1408 uom = uom_obj.browse(cr, uid, uom, context=context)
1409 new_price = res_final['value']['price_unit'] * uom.factor_inv1409 if res.uom_id.category_id.id == uom.category_id.id and res.uom_id.id != uom.id:
1410 new_price = uom_obj._compute_price(cr, uid, res.uom_id.id, res_final['value']['price_unit'], uom.id)
1410 res_final['value']['price_unit'] = new_price1411 res_final['value']['price_unit'] = new_price
1411 return res_final1412 return res_final
14121413