[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

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

View File

@ -371,7 +371,7 @@ class EbicsConfig(models.Model):
tmp_dir = os.path.normpath(self.ebics_files + '/tmp')
if not os.path.isdir(tmp_dir):
os.makedirs(tmp_dir, mode=0o700)
fn_date = fields.Date.today()
fn_date = fields.Date.today().isoformat()
fn = '_'.join([self.ebics_host, 'ini_letter', fn_date]) + '.pdf'
full_tmp_fn = os.path.normpath(tmp_dir + '/' + fn)
user.create_ini_letter(
@ -427,7 +427,7 @@ class EbicsConfig(models.Model):
tmp_dir = os.path.normpath(self.ebics_files + '/tmp')
if not os.path.isdir(tmp_dir):
os.makedirs(tmp_dir, mode=0o700)
fn_date = fields.Date.today()
fn_date = fields.Date.today().isoformat()
fn = '_'.join([self.ebics_host, 'public_bank_keys', fn_date]) + '.txt'
self.write({
'ebics_public_bank_keys': base64.encodestring(public_bank_keys),

View File

@ -50,7 +50,6 @@
</group>
<notebook>
<page string="Keys" groups="account_ebics.group_ebics_manager">
<label string=""/>
<header>
<button name="ebics_init_1" states="draft" string="EBICS Initialisation" type="object" class="oe_highlight"
groups="account.group_account_manager"
@ -87,7 +86,9 @@
<field name="ebics_public_bank_keys" filename="ebics_public_bank_keys_fn"/>
</group>
<group col="4" name="dn" attrs="{'invisible': [('ebics_key_x509', '=', False)]}">
<label string="Distinguished Name attributes used to create self-signed X.509 certificates:" colspan="4"/>
<group colspan="4" col="1">
<strong>Distinguished Name attributes used to create self-signed X.509 certificates:</strong>
</group>
<group name="dn_l" colspan="2">
<field name="ebics_key_x509_dn_cn"/>
<field name="ebics_key_x509_dn_o"/>

View File

@ -21,10 +21,10 @@
</group>
<newline/>
<group expand="0" string="Group By">
<filter string="File Format" context="{'group_by':'format_id'}"/>
<filter string="State" context="{'group_by':'state'}"/>
<filter string="User" context="{'group_by':'user_id'}"/>
<filter string="Company" domain="[]" groups="base.group_multi_company" context="{'group_by':'company_id'}"/>
<filter string="File Format" name="file_format" context="{'group_by':'format_id'}"/>
<filter string="State" name="state" context="{'group_by':'state'}"/>
<filter string="User" name="user" context="{'group_by':'user_id'}"/>
<filter string="Company" name="domain" domain="[]" groups="base.group_multi_company" context="{'group_by':'company_id'}"/>
</group>
</search>
</field>

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"/>

View File

@ -0,0 +1,16 @@
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3
==============================================
Deploy account_ebics module on Odoo Enterprise
==============================================
This module makes it possible to deploy the 'account_ebics'
module on Odoo Enterprise.
This module will be installed automatically when following modules are activated
on your odoo database :
- account_ebics
- account_accountant

View File

View File

@ -0,0 +1,21 @@
# Copyright 2009-2019 Noviat.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'account_ebics on Odoo Enterprise',
'summary': "Deploy account_ebics module on Odoo Enterprise",
'version': '12.0.1.0.0',
'author': 'Noviat',
'category': 'Hidden',
'license': 'AGPL-3',
'installable': True,
'depends': [
'account_ebics',
'account_accountant',
],
'data': [
'views/account_ebics_menu.xml'
],
'installable': True,
'auto_install': True,
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="account_ebics.ebics_processing_menu" model="ir.ui.menu">
<field name="parent_id" eval="ref('account_accountant.menu_accounting')"/>
</record>
</odoo>

View File

@ -3,7 +3,7 @@
{
'name': 'Upload Payment Order via EBICS',
'version': '11.0.1.0.0',
'version': '12.0.1.0.0',
'license': 'AGPL-3',
'author': 'Noviat',
'category': 'Accounting & Finance',