Merge pull request #60 from Noviat/11-c54-support

11.0 account_ebics - add camt 052 and 054 support
This commit is contained in:
Luc De Meyer 2022-12-26 18:43:49 +01:00 committed by GitHub
commit 68fb332a89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View File

@ -84,6 +84,14 @@
<field name="suffix">xml</field>
</record>
<record id="ebics_ff_camt_054_001_02_rdd" model="ebics.file.format">
<field name="name">camt.054.001.02.rdd</field>
<field name="type">down</field>
<field name="order_type">FDL</field>
<field name="description">Bank Statement in Format camt.054</field>
<field name="suffix">c54.xml</field>
</record>
<!--
File format tested with the following banks:
- CIC (France)

View File

@ -78,7 +78,8 @@ class EbicsFile(models.Model):
if ff in ff_methods:
if ff_methods[ff].get('unlink'):
ff_methods[ff]['unlink'](ebics_file)
# remove bank statements
elif ff[:7] == 'camt.05' and ff_methods[ff[:8]].get('unlink'):
ff_methods[ff[:8]]['unlink'](self)
ebics_file.bank_statement_ids.unlink()
return super(EbicsFile, self).unlink()
@ -101,6 +102,10 @@ class EbicsFile(models.Model):
res = ff_methods[ff]['process'](self)
self.state = 'done'
return res
elif ff[:7] == 'camt.05' and ff_methods[ff[:8]].get('process'):
res = ff_methods[ff[:8]]['process'](self)
self.state = 'done'
return res
else:
return self._process_undefined_format()

View File

@ -166,7 +166,7 @@ class EbicsXfer(models.TransientModel):
params = {}
if order_type == 'FDL':
params['filetype'] = df.name
if order_type in ['FDL', 'C53']:
if order_type in ['FDL', 'C52', 'C53', 'C54']:
params.update({
'start': self.date_from or None,
'end': self.date_to or None,