[12.0][MIG] account_ebics

This commit is contained in:
Luc De Meyer
2019-10-17 22:05:42 +02:00
parent 5f863f191c
commit 63db5736cb
12 changed files with 65 additions and 16 deletions

View File

@@ -48,7 +48,6 @@ class EbicsXfer(models.TransientModel):
comodel_name='ebics.config',
string='EBICS Configuration',
domain=[('state', '=', 'active')],
required=True,
default=lambda self: self._default_ebics_config_id())
ebics_passphrase = fields.Char(
string='EBICS Passphrase')
@@ -168,8 +167,12 @@ class EbicsXfer(models.TransientModel):
params['filetype'] = df.name
if order_type in ['FDL', 'C53']:
params.update({
'start': self.date_from or None,
'end': self.date_to or None,
'start':
self.date_from and self.date_from.isoformat()
or None,
'end':
self.date_to and self.date_to.isoformat()
or None,
})
kwargs = {k: v for k, v in params.items() if v}
try:
@@ -447,7 +450,7 @@ class EbicsXfer(models.TransientModel):
fn_parts.append(docname)
else:
fn_date = self.date_to or fields.Date.today()
fn_parts.append(fn_date)
fn_parts.append(fn_date.isoformat())
base_fn = '_'.join(fn_parts)
n = 1
full_tmp_fn = os.path.normpath(tmp_dir + '/' + base_fn)

View File

@@ -9,7 +9,7 @@
<form string="EBICS File Download">
<group>
<separator string="Select your bank :" colspan="2"/>
<field name="ebics_config_id" options="{'no_create': True, 'no_open': True}"/>
<field name="ebics_config_id" required="1" options="{'no_create': True, 'no_open': True}"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="format_id"/>
@@ -31,7 +31,7 @@
<form string="EBICS File Upload">
<group>
<separator string="Select your bank :" colspan="2"/>
<field name="ebics_config_id" options="{'no_create': True, 'no_open': True}"/>
<field name="ebics_config_id" required="1" options="{'no_create': True, 'no_open': True}"/>
<separator string="Select your file :" colspan="2"/>
<field name="upload_data" filename="upload_fname" required="1"/>
<field name="upload_fname" invisible="1"/>