11.0 account_ebics - add camt 052 and 054 support

This commit is contained in:
Luc De Meyer 2022-12-26 18:37:23 +01:00
parent 258f3eb57a
commit 8fe8573906
3 changed files with 15 additions and 2 deletions

View File

@ -84,6 +84,14 @@
<field name="suffix">xml</field> <field name="suffix">xml</field>
</record> </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: File format tested with the following banks:
- CIC (France) - CIC (France)

View File

@ -78,7 +78,8 @@ class EbicsFile(models.Model):
if ff in ff_methods: if ff in ff_methods:
if ff_methods[ff].get('unlink'): if ff_methods[ff].get('unlink'):
ff_methods[ff]['unlink'](ebics_file) 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() ebics_file.bank_statement_ids.unlink()
return super(EbicsFile, self).unlink() return super(EbicsFile, self).unlink()
@ -101,6 +102,10 @@ class EbicsFile(models.Model):
res = ff_methods[ff]['process'](self) res = ff_methods[ff]['process'](self)
self.state = 'done' self.state = 'done'
return res 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: else:
return self._process_undefined_format() return self._process_undefined_format()

View File

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