diff options
| author | Cedric Snauwaert <csn@openerp.com> | 2012-11-23 11:36:57 +0100 |
|---|---|---|
| committer | Cedric Snauwaert <csn@openerp.com> | 2012-11-23 11:36:57 +0100 |
| commit | 8ccbcb8171fc14ca5f75c2e0770985a82eed7f46 (patch) | |
| tree | 5f00cbe0d63daa1e5829efd946c7c13d8cfe104f | |
| parent | 2c0b28c27a51e7fa5d87b4b2df8730fa60c85fd6 (diff) | |
[FIX]gave an error if data['currency_id'] exists but has value false
bzr revid: csn@openerp.com-20121123103657-jgewk23zrz3xo5ty
| -rw-r--r-- | addons/account/account_bank.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/account_bank.py b/addons/account/account_bank.py index 002e08bb2f3..c836600d866 100644 --- a/addons/account/account_bank.py +++ b/addons/account/account_bank.py @@ -45,7 +45,7 @@ class bank(osv.osv): def _prepare_name_get(self, cr, uid, bank_dicts, context=None): """Add ability to have %(currency_name)s in the format_layout of res.partner.bank.type""" - currency_ids = list(set(data['currency_id'][0] for data in bank_dicts if 'currency_id' in data)) + currency_ids = list(set(data['currency_id'][0] for data in bank_dicts if data.get('currency_id'))) currencies = self.pool.get('res.currency').browse(cr, uid, currency_ids, context=context) currency_name = dict((currency.id, currency.name) for currency in currencies) |
