[FIX]hr_expense :improve fource journal if fource journal have currency convert the expense to that currency
bzr revid: mma@tinyerp.com-20120814054348-6ofe8r0fcksbhp85
This commit is contained in:
parent
52eb6fd1dd
commit
25367f13bb
|
@ -162,6 +162,11 @@ class hr_expense_expense(osv.osv):
|
|||
total_amount = line.total_amount
|
||||
if exp.journal_id:
|
||||
journal = exp.journal_id
|
||||
if journal.currency:
|
||||
if exp.currency_id != journal.currency:
|
||||
total_amount = currency_obj.compute(cr, uid, exp.currency_id.id, journal.currency.id, line.total_amount, context=ctx)
|
||||
else:
|
||||
total_amount = line.total_amount
|
||||
else:
|
||||
journal_id = voucher_obj._get_journal(cr, uid, context={'type': 'purchase', 'company_id': company_id})
|
||||
if journal_id:
|
||||
|
|
Loading…
Reference in New Issue