~therp-nl/banking-addons/6.1-dev-fixes_from_testing_iteration_1

« back to all changes in this revision

Viewing changes to account_banking/account_banking.py

  • Committer: Stefan Rijnhart
  • Date: 2012-04-14 09:16:54 UTC
  • mfrom: (121.1.4 6.1-dev)
  • Revision ID: stefan@therp.nl-20120414091654-aw92jhhhijl69nok
[MRG] Merged with main development branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1135
1135
        Create dual function IBAN account for SEPA countries
1136
1136
        '''
1137
1137
        if vals['state'] == 'iban':
 
1138
            iban = vals.get('acc_number',False) or vals.get('acc_number_domestic',False)
1138
1139
            vals['acc_number'], vals['acc_number_domestic'] = (
1139
 
                self._correct_IBAN(vals['acc_number']))
 
1140
                self._correct_IBAN(iban))
1140
1141
        return self._founder.create(cursor, uid, vals, context)
1141
1142
 
1142
1143
    def write(self, cr, uid, ids, vals, context=None):
1426
1427
                      )
1427
1428
 
1428
1429
    _constraints = [
1429
 
        (check_iban, _("The IBAN number doesn't seem to be correct"), ["acc_number"])
 
1430
        # Cannot have this as a constraint as it is rejecting valid numbers from GB and DE
 
1431
        # It works much better without this constraint!
 
1432
        #(check_iban, _("The IBAN number doesn't seem to be correct"), ["acc_number"])
1430
1433
    ]
1431
1434
 
1432
1435
res_partner_bank()