~taktik/openobject-addons/hui-extra-6.1

« back to all changes in this revision

Viewing changes to account_pain/wizard/pain_wizard.py

  • Committer: root
  • Date: 2012-12-01 11:35:36 UTC
  • Revision ID: root@oerp61-20121201113536-8z5linhviqmmmk4f
update account_pain

Show diffs side-by-side

added added

removed removed

Lines of Context:
361
361
                Amt = etree.SubElement(CdtTrfTxInf, 'Amt')
362
362
                InstdAmt = etree.SubElement(Amt, 'InstdAmt', Ccy=line.currency.name)
363
363
                InstdAmt.text = '%.2f' % line.amount
364
 
                if line.bank_id.iban[0:2].upper() != 'BE':
 
364
                if line.bank_id.iban[0:2].upper() not in ['BE']: # to be completed with other countries allowing payments without BIC
365
365
                    if not (line.bank_id.bank_bic or line.bank_id.bank.bic):
366
366
                        raise osv.except_osv(_('Configuration Error!'),
367
367
                           _('Unsupported Payment Instruction in Payment Line %s.\n'    \
370
370
                    CdtrAgt = etree.SubElement(CdtTrfTxInf, 'CdtrAgt')
371
371
                    FinInstnId = etree.SubElement(CdtrAgt, 'FinInstnId')
372
372
                    BIC = etree.SubElement(FinInstnId, 'BIC')
373
 
                    BIC.text = line.bank_id.bank_bic.upper() or line.bank_id.bank.bic.upper()
 
373
                    BIC.text = re.sub('\s','',line.bank_id.bank_bic.upper() or line.bank_id.bank.bic.upper())
374
374
                Cdtr = etree.SubElement(CdtTrfTxInf, 'Cdtr')
375
375
                Nm = etree.SubElement(Cdtr, 'Nm')
376
376
                Nm.text = line.partner_id.name