11.0 account_ebics - add camt 052 and 054 support

This commit is contained in:
Luc De Meyer 2022-12-26 17:50:11 +01:00
parent 39d7decb77
commit 258f3eb57a
4 changed files with 58 additions and 4 deletions

View File

@ -3,7 +3,7 @@
{
'name': 'EBICS banking protocol',
'version': '11.0.1.7.3',
'version': '11.0.1.8.0',
'license': 'AGPL-3',
'author': 'Noviat',
'category': 'Accounting & Finance',

View File

@ -2,6 +2,15 @@
<odoo>
<data noupdate="1">
<record id="ebics_ff_C52" model="ebics.file.format">
<field name="name">camt.052</field>
<field name="type">down</field>
<field name="order_type">C52</field>
<field name="download_process_method">camt.052</field>
<field name="description">bank to customer account report in format camt.052</field>
<field name="suffix">c52.xml</field>
</record>
<!--
File format tested with the following banks:
- GLS Gemeinschaftsbank (Germany)
@ -14,6 +23,15 @@
<field name="suffix">c53.xml</field>
</record>
<record id="ebics_ff_C54" model="ebics.file.format">
<field name="name">camt.054</field>
<field name="type">down</field>
<field name="order_type">C54</field>
<field name="download_process_method">camt.054</field>
<field name="description">Bank to customer debit credit notification in format camt.054</field>
<field name="suffix">c54.xml</field>
</record>
<!--
File format tested with the following banks:
- GLS Gemeinschaftsbank (Germany)

View File

@ -1,4 +1,4 @@
# Copyright 2009-2019 Noviat.
# Copyright 2009-2022 Noviat.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
@ -128,9 +128,15 @@ class EbicsFile(models.Model):
'camt.xxx.cfonb120.stm':
{'process': self._process_cfonb120,
'unlink': self._unlink_cfonb120},
'camt.052':
{'process': self._process_camt052,
'unlink': self._unlink_camt052},
'camt.053.001.02.stm':
{'process': self._process_camt053,
'unlink': self._unlink_camt053},
'camt.054':
{'process': self._process_camt054,
'unlink': self._unlink_camt054},
}
return res
@ -205,6 +211,34 @@ class EbicsFile(models.Model):
"""
pass
@staticmethod
def _process_camt052(self):
import_module = 'account_bank_statement_import_camt_oca'
self._check_import_module(import_module)
return self._process_camt053(self)
@staticmethod
def _unlink_camt052(self):
"""
Placeholder for camt052 specific actions before removing the
EBICS data file and its related bank statements.
"""
pass
@staticmethod
def _process_camt054(self):
import_module = 'account_bank_statement_import_camt_oca'
self._check_import_module(import_module)
return self._process_camt053(self)
@staticmethod
def _unlink_camt054(self):
"""
Placeholder for camt054 specific actions before removing the
EBICS data file and its related bank statements.
"""
pass
@staticmethod
def _process_camt053(self):
import_module = 'account_bank_statement_import_camt%'

View File

@ -1,4 +1,4 @@
# Copyright 2009-2018 Noviat.
# Copyright 2009-2022 Noviat.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
@ -48,7 +48,7 @@ class EbicsFileFormat(models.Model):
return ['FUL', 'CCT', 'CDD', 'CDB', 'XE2', 'XE3']
def _supported_download_order_types(self):
return ['FDL', 'C53']
return ['FDL', 'C52', 'C53', 'C54']
@api.model
def _selection_name(self):
@ -71,7 +71,9 @@ class EbicsFileFormat(models.Model):
'pain.008.001.02.sbb',
'camt.xxx.cfonb120.stm',
'pain.001.001.02.sct',
'camt.052',
'camt.053',
'camt.054',
'pain.001',
'pain.008',
]