[FIX] account_voucher: fixed currency on voucher.line in case there was no move_line_id
bzr revid: qdp-launchpad@openerp.com-20110822105339-i8r8lcy1pki43gdo
This commit is contained in:
parent
acba6c7c34
commit
592297de43
|
@ -899,7 +899,10 @@ class account_voucher_line(osv.osv):
|
|||
res = {}
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
move_line = line.move_line_id
|
||||
res[line.id] = move_line.currency_id and move_line.currency_id.id or move_line.company_id.currency_id.id
|
||||
if move_line:
|
||||
res[line.id] = move_line.currency_id and move_line.currency_id.id or move_line.company_id.currency_id.id
|
||||
else:
|
||||
res[line.id] = line.voucher_id.currency_id.id
|
||||
return res
|
||||
|
||||
def _get_amounts(self, cr, uid, line_browse_rec, context=None):
|
||||
|
|
Loading…
Reference in New Issue