projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d978c78
)
[FIX] account_voucher: getting default invoice crashes
author
Raphael Collet
<rco@openerp.com>
Thu, 13 Nov 2014 11:42:18 +0000
(12:42 +0100)
committer
Raphael Collet
<rco@openerp.com>
Thu, 13 Nov 2014 13:48:53 +0000
(14:48 +0100)
Fixes #3524.
addons/account_voucher/account_voucher.py
patch
|
blob
|
history
diff --git
a/addons/account_voucher/account_voucher.py
b/addons/account_voucher/account_voucher.py
index
e1483ab
..
78060e8
100644
(file)
--- a/
addons/account_voucher/account_voucher.py
+++ b/
addons/account_voucher/account_voucher.py
@@
-125,6
+125,9
@@
class account_voucher(osv.osv):
journal_pool = self.pool.get('account.journal')
journal_id = context.get('journal_id', False)
if journal_id:
+ if isinstance(journal_id, (list, tuple)):
+ # sometimes journal_id is a pair (id, display_name)
+ journal_id = journal_id[0]
journal = journal_pool.browse(cr, uid, journal_id, context=context)
if journal.currency:
return journal.currency.id