Merge lp:~camptocamp/openobject-addons/6.1-l10n_ch-bankaccount-name_get-lp1066854 into lp:openobject-addons/6.1

Proposed by Guewen Baconnier @ Camptocamp
Status: Needs review
Proposed branch: lp:~camptocamp/openobject-addons/6.1-l10n_ch-bankaccount-name_get-lp1066854
Merge into: lp:openobject-addons/6.1
Diff against target: 25 lines (+0/-15)
1 file modified
l10n_ch/bank.py (+0/-15)
To merge this branch: bzr merge lp:~camptocamp/openobject-addons/6.1-l10n_ch-bankaccount-name_get-lp1066854
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+129666@code.launchpad.net

Description of the change

Hi,

More details here : lp:1066854

Thanks
Guewen

To post a comment you must log in.

Unmerged revisions

7029. By Guewen Baconnier @ Camptocamp <email address hidden> on 2012-10-15

[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.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_ch/bank.py'
2--- l10n_ch/bank.py 2012-05-15 13:53:26 +0000
3+++ l10n_ch/bank.py 2012-10-15 12:56:23 +0000
4@@ -57,21 +57,6 @@
5 'my_bank': fields.boolean('Use my account to print BVR ?', help="Check to print BVR invoices"),
6 }
7
8- def name_get(self, cursor, uid, ids, context=None):
9- if not len(ids):
10- return []
11- bank_type_obj = self.pool.get('res.partner.bank.type')
12-
13- type_ids = bank_type_obj.search(cursor, uid, [])
14- bank_type_names = {}
15- for bank_type in bank_type_obj.browse(cursor, uid, type_ids,
16- context=context):
17- bank_type_names[bank_type.code] = bank_type.name
18- res = []
19- for r in self.read(cursor, uid, ids, ['name','state'], context):
20- res.append((r['id'], r['name']+' : '+bank_type_names.get(r['state'], '')))
21- return res
22-
23 def _prepare_name(self, bank):
24 "Hook to get bank number of bank account"
25 res = u''