[FIX] removed name_get on l10n_ch, bank accounts
bzr revid: fp@tinyerp.com-20121112102252-e138qhzghwjzxvct
This commit is contained in:
commit
664175b7d4
|
@ -52,21 +52,6 @@ class ResPartnerBank(osv.osv):
|
||||||
'my_bank': fields.boolean('Use my account to print BVR ?', help="Check to print BVR invoices"),
|
'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):
|
def _prepare_name(self, bank):
|
||||||
"Hook to get bank number of bank account"
|
"Hook to get bank number of bank account"
|
||||||
res = u''
|
res = u''
|
||||||
|
|
Loading…
Reference in New Issue