~acsone-openerp/banking-addons/ba-70-missing-transfer-account

« back to all changes in this revision

Viewing changes to account_banking_nl_abnamro/abnamro.py

  • Committer: Holger Brunn
  • Author(s): stefan at therp
  • Date: 2013-06-10 10:15:17 UTC
  • mfrom: (169.1.1 abnamro)
  • Revision ID: hbrunn@therp.nl-20130610101517-5v10rjw0iayfj19p
[FIX] abnamro payment order recognition

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
        'INTL': bt.ORDER, # international order
91
91
        'UNKN': bt.ORDER, # everything else
92
92
        'SEPA': bt.ORDER,
 
93
        'PAYB': bt.PAYMENT_BATCH,
93
94
    }
94
95
 
95
96
    def __init__(self, line, *args, **kwargs):
116
117
            elif not self.execution_date:
117
118
                self.error_message = "No execution date"
118
119
            elif not self.remote_account and self.transfer_type not in [
119
 
                'BEA', 'GEA', 'COSTS', 'UNKN',
 
120
                'BEA', 'GEA', 'COSTS', 'UNKN', 'PAYB',
120
121
                ]:
121
122
                self.error_message = _('No remote account for transaction type '
122
123
                                       '%s') % self.transfer_type
246
247
                remote_owner = field[14:32].strip()
247
248
            elif re.match("^EL[0-9]{13}I", field):
248
249
                transfer_type = 'INTL'
 
250
            elif field.startswith("TOTAAL BETALINGEN"):
 
251
                transfer_type = 'PAYB'
249
252
            return (transfer_type, remote_account, remote_owner)
250
253
        
251
254
        fields = split_blob(self.blob)