From b30803cfc9c21ecb98084dcdf1e40f7bf57df973 Mon Sep 17 00:00:00 2001 From: Date: Mon, 15 Oct 2012 13:57:37 +0200 Subject: [PATCH] [FIX] l10n_ch: removed the name_get of res.partner.bank which is a remaining of older versions but hides a standard feature of account bank types, which allows to configure the format layout per type of bank account. bzr revid: guewen.baconnier@camptocamp.com-20121015115737-z5ktvyn2lqawp1hr --- addons/l10n_ch/bank.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/addons/l10n_ch/bank.py b/addons/l10n_ch/bank.py index 79dcb1a6834..4e4c0e0aa8c 100644 --- a/addons/l10n_ch/bank.py +++ b/addons/l10n_ch/bank.py @@ -52,21 +52,6 @@ class ResPartnerBank(osv.osv): 'my_bank': fields.boolean('Use my account to print BVR ?', help="Check to print BVR invoices"), } - def name_get(self, cursor, uid, ids, context=None): - if not len(ids): - return [] - bank_type_obj = self.pool.get('res.partner.bank.type') - - type_ids = bank_type_obj.search(cursor, uid, []) - bank_type_names = {} - for bank_type in bank_type_obj.browse(cursor, uid, type_ids, - context=context): - bank_type_names[bank_type.code] = bank_type.name - res = [] - for r in self.read(cursor, uid, ids, ['name','state'], context): - res.append((r['id'], r['name']+' : '+bank_type_names.get(r['state'], ''))) - return res - def _prepare_name(self, bank): "Hook to get bank number of bank account" res = u''