[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
This commit is contained in:
2012-10-15 13:57:37 +02:00
parent 7f23ad5de5
commit b30803cfc9
1 changed files with 0 additions and 15 deletions

View File

@ -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''