[FIX] Account: fixed bug in method amount_change of class account_invoice_tax

bzr revid: pap@tinyerp.co.in-20100830102703-und6z4yrrgmwezvj
This commit is contained in:
pap (openerp) 2010-08-30 15:57:03 +05:30
parent 368cc09218
commit b2395a0b37
2 changed files with 7 additions and 6 deletions

View File

@ -1000,7 +1000,7 @@ class account_move(osv.osv):
@param context: context arguments, like lang, time zone
@param limit: Returns first 'n' ids of complete result, default is 80.
@return: Returns a list of tupples containing id and name
@return: Returns a list of tuples containing id and name
"""
if not args:

View File

@ -1497,12 +1497,13 @@ class account_invoice_tax(osv.osv):
cur_obj = self.pool.get('res.currency')
company_obj = self.pool.get('res.company')
company_currency = False
tax_amount = self.read(cr, uid, ids[0], ['tax_amount'])['tax_amount']
tax_sign = 1
if tax_amount < 0:
tax_sign = -1
elif tax_amount == 0:
tax_sign = 0
if ids:
tax_amount = self.read(cr, uid, ids[0], ['tax_amount'])['tax_amount']
if tax_amount < 0:
tax_sign = -1
elif tax_amount == 0:
tax_sign = 0
if company_id:
company_currency = company_obj.read(cr, uid, [company_id], ['currency_id'])[0]['currency_id'][0]
if currency_id and company_currency: