[FIX] Account:Product 's unit price changed automatically

lp bug: https://launchpad.net/bugs/728378 fixed

bzr revid: ara@tinyerp.com-20110307061202-5z2i21cexca8j4ph
This commit is contained in:
ARA (OpenERP) 2011-03-07 11:42:02 +05:30
parent 1e681a15bc
commit 997e6045db
1 changed files with 2 additions and 0 deletions

View File

@ -1352,6 +1352,8 @@ class account_invoice_line(osv.osv):
currency = self.pool.get('res.currency').browse(cr, uid, currency_id, context=context)
if company.currency_id.id != currency.id:
if type in ('in_invoice', 'in_refund'):
res_final['value']['price_unit'] = res.standard_price
new_price = res_final['value']['price_unit'] * currency.rate
res_final['value']['price_unit'] = new_price