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
=== modified file 'l10n_ch/bank.py'
--- l10n_ch/bank.py 2012-05-15 13:53:26 +0000
+++ l10n_ch/bank.py 2012-10-15 13:02:23 +0000
@@ -57,21 +57,6 @@
57 'my_bank': fields.boolean('Use my account to print BVR ?', help="Check to print BVR invoices"),57 'my_bank': fields.boolean('Use my account to print BVR ?', help="Check to print BVR invoices"),
58 }58 }
5959
60 def name_get(self, cursor, uid, ids, context=None):
61 if not len(ids):
62 return []
63 bank_type_obj = self.pool.get('res.partner.bank.type')
64
65 type_ids = bank_type_obj.search(cursor, uid, [])
66 bank_type_names = {}
67 for bank_type in bank_type_obj.browse(cursor, uid, type_ids,
68 context=context):
69 bank_type_names[bank_type.code] = bank_type.name
70 res = []
71 for r in self.read(cursor, uid, ids, ['name','state'], context):
72 res.append((r['id'], r['name']+' : '+bank_type_names.get(r['state'], '')))
73 return res
74
75 def _prepare_name(self, bank):60 def _prepare_name(self, bank):
76 "Hook to get bank number of bank account"61 "Hook to get bank number of bank account"
77 res = u''62 res = u''

Subscribers

People subscribed via source and target branches

to all changes: