From 3c0de0aafd5eb68ac5f8329fbd3778ba967aac18 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Wed, 9 Dec 2020 21:48:58 +0100 Subject: [PATCH] add placeholder logic to add pain.002 processing logic --- account_ebics/data/ebics_file_format.xml | 1 + account_ebics/models/ebics_file.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/account_ebics/data/ebics_file_format.xml b/account_ebics/data/ebics_file_format.xml index 7aa2601..da1766f 100644 --- a/account_ebics/data/ebics_file_format.xml +++ b/account_ebics/data/ebics_file_format.xml @@ -79,6 +79,7 @@ pain.002 down Z01 + pain.002 Payment status report for direct debit in format pain.002 psr.xml diff --git a/account_ebics/models/ebics_file.py b/account_ebics/models/ebics_file.py index 4cc4d63..07eabf8 100644 --- a/account_ebics/models/ebics_file.py +++ b/account_ebics/models/ebics_file.py @@ -137,6 +137,9 @@ class EbicsFile(models.Model): 'camt.054': {'process': self._process_camt054, 'unlink': self._unlink_camt054}, + 'pain.002': + {'process': self._process_pain002, + 'unlink': self._unlink_pain002}, } return res @@ -289,6 +292,23 @@ class EbicsFile(models.Model): """ pass + @staticmethod + def _process_pain002(self): + """ + Placeholder for processing pain.002 files. + TODO: + add import logic based upon OCA 'account_payment_return_import' + """ + pass + + @staticmethod + def _unlink_pain002(self): + """ + Placeholder for pain.002 specific actions before removing the + EBICS data file. + """ + raise NotImplementedError + def _process_undefined_format(self): raise UserError(_( "The current version of the 'account_ebics' module "