Merge lp:~camptocamp/openobject-addons/xa6.1-l10n_ch-bankaccount-name_get-lp1066854 into lp:~camptocamp/openobject-addons/6.1-c2c-official

Proposed by Guewen Baconnier @ Camptocamp
Status: Needs review
Proposed branch: lp:~camptocamp/openobject-addons/xa6.1-l10n_ch-bankaccount-name_get-lp1066854
Merge into: lp:~camptocamp/openobject-addons/6.1-c2c-official
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/xa6.1-l10n_ch-bankaccount-name_get-lp1066854
Reviewer Review Type Date Requested Status
Camptocamp Pending
Review via email: mp+129669@code.launchpad.net

Description of the change

Hi,

More details here: lp:1066854

The merge proposals for the 6.1 and trunk branches are already done here:
https://code.launchpad.net/~c2c/openobject-addons/trunk-l10n_ch-bankaccount-name_get-lp1066854/+merge/129665
https://code.launchpad.net/~c2c/openobject-addons/6.1-l10n_ch-bankaccount-name_get-lp1066854/+merge/129666

But as they probably won't be merged soon, or even never for the 6.1 release, I think that we have to merge it in our branch.

Thanks
Guewen

To post a comment you must log in.

Unmerged revisions

6632. By Guewen Baconnier @ Camptocamp <email address hidden>

[FIX] l10n_ch: removed the name_get of res.partner.bank which is a remnant of older versions, but hides a standard feature of account bank types, which allows to configure the format layout per type of bank account. (lp:1066854)

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 13:02: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''

Subscribers

People subscribed via source and target branches

to all changes: