[FIX] account_voucher: improve code for Payment Invoice will set journal depending the currency in Invoice
bzr revid: psi@tinyerp.co.in-20110113103356-6w3j7lrcmmev0p7q
This commit is contained in:
parent
d413b86477
commit
9805de2cfb
|
@ -47,7 +47,7 @@ class account_voucher(osv.osv):
|
|||
journal_pool = self.pool.get('account.journal')
|
||||
invoice_pool = self.pool.get('account.invoice')
|
||||
if context.get('invoice_id', False):
|
||||
currency_id = invoice_pool.browse(cr, uid, context.get('invoice_id'), context=context).currency_id.id
|
||||
currency_id = invoice_pool.browse(cr, uid, context['invoice_id'], context=context).currency_id.id
|
||||
journal_id = journal_pool.search(cr, uid, [('currency', '=', currency_id)], limit=1)
|
||||
return journal_id and journal_id[0] or False
|
||||
if context.get('journal_id', False):
|
||||
|
|
Loading…
Reference in New Issue