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:
d572f1b
)
Add ability to have %(currency_name)s in the format_layout of res.partner.bank.type
author
Alexis de Lattre
<alexis@via.ecp.fr>
Tue, 10 Jul 2012 23:35:03 +0000
(
01:35
+0200)
committer
Alexis de Lattre
<alexis@via.ecp.fr>
Tue, 10 Jul 2012 23:35:03 +0000
(
01:35
+0200)
bzr revid: alexis@via.ecp.fr-
20120710233503
-i2b9g62syvz02gra
addons/account/account_bank.py
patch
|
blob
|
history
diff --git
a/addons/account/account_bank.py
b/addons/account/account_bank.py
index
cbc5a96
..
ef14612
100644
(file)
--- a/
addons/account/account_bank.py
+++ b/
addons/account/account_bank.py
@@
-43,6
+43,12
@@
class bank(osv.osv):
"Return the name to use when creating a bank journal"
return (bank.bank_name or '') + ' ' + bank.acc_number
"Return the name to use when creating a bank journal"
return (bank.bank_name or '') + ' ' + bank.acc_number
+ def _prepare_name_get(self, cr, uid, bank_type_obj, bank_obj, context=None):
+ """Add ability to have %(currency_name)s in the format_layout of
+ res.partner.bank.type"""
+ bank_obj._data[bank_obj.id]['currency_name'] = bank_obj.currency_id and bank_obj.currency_id.name or ''
+ return super(bank, self)._prepare_name_get(cr, uid, bank_type_obj, bank_obj, context=context)
+
def post_write(self, cr, uid, ids, context={}):
if isinstance(ids, (int, long)):
ids = [ids]
def post_write(self, cr, uid, ids, context={}):
if isinstance(ids, (int, long)):
ids = [ids]