Merge lp:~openerp-dev/openobject-addons/6.0-opw-573996-ado into lp:openobject-addons/6.0

Proposed by Amit Dodiya (OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 5197
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-573996-ado
Merge into: lp:openobject-addons/6.0
Diff against target: 12 lines (+1/-1)
1 file modified
base_iban/base_iban.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-573996-ado
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+102814@code.launchpad.net

Description of the change

Hello,

"[FIX] the checks default_iban_check always fail and returns The IBAN is invalid"

Steps:
1). Install base_iban
2). Add Bank details in customer form

The iban number you have entered that has been set to upper case letters and that are compared only with lower case letters in def _construct_constraint_msg() so the checks always fail and returns 'The IBAN is invalid, It should begin with the country code'

Code is back-ported from stable 6.1

Regards,
Amit

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

Unmerged revisions

5197. By Amit Dodiya (OpenERP)

[FIX] the checks default_iban_check always fail and returns The IBAN is invalid

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_iban/base_iban.py'
2--- base_iban/base_iban.py 2011-01-14 09:34:28 +0000
3+++ base_iban/base_iban.py 2012-04-20 08:34:28 +0000
4@@ -114,7 +114,7 @@
5 def default_iban_check(iban_cn):
6 return iban_cn[0] in string.ascii_lowercase and iban_cn[1] in string.ascii_lowercase
7
8- iban_country = self.browse(cr, uid, ids)[0].iban[:2]
9+ iban_country = self.browse(cr, uid, ids)[0].iban[:2].lower()
10 if default_iban_check(iban_country):
11 iban_example = iban_country in _ref_iban and _ref_iban[iban_country] + ' \nWhere A = Account number, B = National bank code, S = Branch code, C = account No, N = branch No, K = National check digits....' or ''
12 return _('The IBAN does not seem to be correct. You should have entered something like this %s'), (iban_example)