mirror of
https://github.com/brain-tec/account_ebics.git
synced 2024-11-23 20:52:04 +00:00
Merge pull request #1 from Noviat/16.0
Syncing from upstream Noviat/account_ebics (16.0)
This commit is contained in:
commit
da58181f3a
@ -167,7 +167,7 @@ Most commonly used formats for which support is available in Odoo should be ther
|
|||||||
|
|
||||||
Please open an issue on https://github.com/Noviat/account_ebics to report missing EBICS File Formats.
|
Please open an issue on https://github.com/Noviat/account_ebics to report missing EBICS File Formats.
|
||||||
|
|
||||||
For File Formats of type 'Downloads' you can also specifiy a 'Download Process Method'.
|
For File Formats of type 'Downloads' you can also specify a 'Download Process Method'.
|
||||||
|
|
||||||
This is the method that will be executed when hitting the 'Process' button on the downloaded file.
|
This is the method that will be executed when hitting the 'Process' button on the downloaded file.
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ During the processing of your EBICS upload/download, your bank may return an Err
|
|||||||
EBICS Functional Error:
|
EBICS Functional Error:
|
||||||
EBICS_NO_DOWNLOAD_DATA_AVAILABLE (code: 90005)
|
EBICS_NO_DOWNLOAD_DATA_AVAILABLE (code: 90005)
|
||||||
|
|
||||||
A detailled explanation of the codes can be found on http://www.ebics.org.
|
A detailed explanation of the codes can be found on http://www.ebics.org.
|
||||||
You can also find this information in the doc folder of this module (file EBICS_Annex1_ReturnCodes).
|
You can also find this information in the doc folder of this module (file EBICS_Annex1_ReturnCodes).
|
||||||
|
|
||||||
|
|
|
|
||||||
@ -213,7 +213,7 @@ You can also find this information in the doc folder of this module (file EBICS_
|
|||||||
Known Issues / Roadmap
|
Known Issues / Roadmap
|
||||||
======================
|
======================
|
||||||
|
|
||||||
- add support to import externally generated keys & certificates (currently only 3SKey signature certificate).
|
- Add support to import externally generated keys & certificates (currently only 3SKey signature certificate).
|
||||||
- For Odoo 16.0 the interaction with the OCA payment order and bank statement import modules (e.g. french CFONB) is not yet available.
|
- For Odoo 16.0 the interaction with the OCA payment order and bank statement import modules (e.g. french CFONB) is not yet available.
|
||||||
- Electronic Distributed Signature (EDS) is not supported in the current version of this module.
|
- Electronic Distributed Signature (EDS) is not supported in the current version of this module.
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "EBICS banking protocol",
|
"name": "EBICS banking protocol",
|
||||||
"version": "16.0.1.2.0",
|
"version": "16.0.1.3.0",
|
||||||
"license": "LGPL-3",
|
"license": "LGPL-3",
|
||||||
"author": "Noviat",
|
"author": "Noviat",
|
||||||
"website": "https://www.noviat.com",
|
"website": "https://www.noviat.com",
|
||||||
|
@ -84,6 +84,18 @@ class EbicsUserID(models.Model):
|
|||||||
"This default can be overriden for specific "
|
"This default can be overriden for specific "
|
||||||
"EBICS transactions (cf. File Formats).",
|
"EBICS transactions (cf. File Formats).",
|
||||||
)
|
)
|
||||||
|
transaction_rights = fields.Selection(
|
||||||
|
selection=[
|
||||||
|
("both", "Download and Upload"),
|
||||||
|
("down", "Download Only"),
|
||||||
|
("up", "Upload Only"),
|
||||||
|
],
|
||||||
|
string="Allowed Transactions",
|
||||||
|
default="both",
|
||||||
|
required=True,
|
||||||
|
help="Use this parameter to limit the transactions for this User "
|
||||||
|
"to downloads or uploads.",
|
||||||
|
)
|
||||||
ebics_keys_fn = fields.Char(compute="_compute_ebics_keys_fn")
|
ebics_keys_fn = fields.Char(compute="_compute_ebics_keys_fn")
|
||||||
ebics_keys_found = fields.Boolean(compute="_compute_ebics_keys_found")
|
ebics_keys_found = fields.Boolean(compute="_compute_ebics_keys_found")
|
||||||
ebics_passphrase = fields.Char(string="EBICS Passphrase")
|
ebics_passphrase = fields.Char(string="EBICS Passphrase")
|
||||||
|
@ -521,7 +521,7 @@ fintech_register_users = USER1, USER2
|
|||||||
<p>Check if the EBICS File formats that you want to process in Odoo are defined.</p>
|
<p>Check if the EBICS File formats that you want to process in Odoo are defined.</p>
|
||||||
<p>Most commonly used formats for which support is available in Odoo should be there already.</p>
|
<p>Most commonly used formats for which support is available in Odoo should be there already.</p>
|
||||||
<p>Please open an issue on <a class="reference external" href="https://github.com/Noviat/account_ebics">https://github.com/Noviat/account_ebics</a> to report missing EBICS File Formats.</p>
|
<p>Please open an issue on <a class="reference external" href="https://github.com/Noviat/account_ebics">https://github.com/Noviat/account_ebics</a> to report missing EBICS File Formats.</p>
|
||||||
<p>For File Formats of type 'Downloads' you can also specifiy a 'Download Process Method'.</p>
|
<p>For File Formats of type 'Downloads' you can also specify a 'Download Process Method'.</p>
|
||||||
<p>This is the method that will be executed when hitting the 'Process' button on the downloaded file.</p>
|
<p>This is the method that will be executed when hitting the 'Process' button on the downloaded file.</p>
|
||||||
<p>The following methods are currently available:</p>
|
<p>The following methods are currently available:</p>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
@ -552,7 +552,7 @@ fintech_register_users = USER1, USER2
|
|||||||
<p>During the processing of your EBICS upload/download, your bank may return an Error Code, e.g.</p>
|
<p>During the processing of your EBICS upload/download, your bank may return an Error Code, e.g.</p>
|
||||||
<p>EBICS Functional Error:
|
<p>EBICS Functional Error:
|
||||||
EBICS_NO_DOWNLOAD_DATA_AVAILABLE (code: 90005)</p>
|
EBICS_NO_DOWNLOAD_DATA_AVAILABLE (code: 90005)</p>
|
||||||
<p>A detailled explanation of the codes can be found on <a class="reference external" href="http://www.ebics.org">http://www.ebics.org</a>.
|
<p>A detailed explanation of the codes can be found on <a class="reference external" href="http://www.ebics.org">http://www.ebics.org</a>.
|
||||||
You can also find this information in the doc folder of this module (file EBICS_Annex1_ReturnCodes).</p>
|
You can also find this information in the doc folder of this module (file EBICS_Annex1_ReturnCodes).</p>
|
||||||
<div class="line-block">
|
<div class="line-block">
|
||||||
<div class="line"><br /></div>
|
<div class="line"><br /></div>
|
||||||
@ -562,7 +562,7 @@ You can also find this information in the doc folder of this module (file EBICS_
|
|||||||
<div class="section" id="known-issues-roadmap">
|
<div class="section" id="known-issues-roadmap">
|
||||||
<h2>Known Issues / Roadmap</h2>
|
<h2>Known Issues / Roadmap</h2>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>add support to import externally generated keys & certificates (currently only 3SKey signature certificate).</li>
|
<li>Add support to import externally generated keys & certificates (currently only 3SKey signature certificate).</li>
|
||||||
<li>For Odoo 16.0 the interaction with the OCA payment order and bank statement import modules (e.g. french CFONB) is not yet available.</li>
|
<li>For Odoo 16.0 the interaction with the OCA payment order and bank statement import modules (e.g. french CFONB) is not yet available.</li>
|
||||||
<li>Electronic Distributed Signature (EDS) is not supported in the current version of this module.</li>
|
<li>Electronic Distributed Signature (EDS) is not supported in the current version of this module.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -94,6 +94,7 @@
|
|||||||
attrs="{'required': [('ebics_passphrase_store', '=', True)], 'invisible': [('state', '!=', 'draft')]}"
|
attrs="{'required': [('ebics_passphrase_store', '=', True)], 'invisible': [('state', '!=', 'draft')]}"
|
||||||
/>
|
/>
|
||||||
<field name="ebics_passphrase_store" />
|
<field name="ebics_passphrase_store" />
|
||||||
|
<field name="transaction_rights" />
|
||||||
<field name="active" />
|
<field name="active" />
|
||||||
</group>
|
</group>
|
||||||
<group name="main-right">
|
<group name="main-right">
|
||||||
|
@ -113,29 +113,40 @@ class EbicsXfer(models.TransientModel):
|
|||||||
|
|
||||||
@api.onchange("ebics_config_id")
|
@api.onchange("ebics_config_id")
|
||||||
def _onchange_ebics_config_id(self):
|
def _onchange_ebics_config_id(self):
|
||||||
ebics_userids = self.ebics_config_id.ebics_userid_ids
|
avail_userids = self.ebics_config_id.ebics_userid_ids.filtered(
|
||||||
if self.env.context.get("ebics_download"):
|
lambda r: self.env.user.id in r.user_ids.ids
|
||||||
download_formats = self.ebics_config_id.ebics_file_format_ids.filtered(
|
)
|
||||||
|
|
||||||
|
if self.env.context.get("ebics_download"): # Download Form
|
||||||
|
avail_formats = self.ebics_config_id.ebics_file_format_ids.filtered(
|
||||||
lambda r: r.type == "down"
|
lambda r: r.type == "down"
|
||||||
)
|
)
|
||||||
if len(download_formats) == 1:
|
avail_userids = avail_userids.filtered(
|
||||||
self.format_id = download_formats
|
lambda r: r.transaction_rights in ["both", "down"]
|
||||||
if len(ebics_userids) == 1:
|
|
||||||
self.ebics_userid_id = ebics_userids
|
|
||||||
else:
|
|
||||||
transport_users = ebics_userids.filtered(
|
|
||||||
lambda r: r.signature_class == "T"
|
|
||||||
)
|
)
|
||||||
if len(transport_users) == 1:
|
else: # Upload Form
|
||||||
self.ebics_userid_id = transport_users
|
avail_formats = self.ebics_config_id.ebics_file_format_ids.filtered(
|
||||||
else:
|
|
||||||
upload_formats = self.ebics_config_id.ebics_file_format_ids.filtered(
|
|
||||||
lambda r: r.type == "up"
|
lambda r: r.type == "up"
|
||||||
)
|
)
|
||||||
if len(upload_formats) == 1:
|
avail_userids = avail_userids.filtered(
|
||||||
self.format_id = upload_formats
|
lambda r: r.transaction_rights in ["both", "up"]
|
||||||
if len(ebics_userids) == 1:
|
)
|
||||||
self.ebics_userid_id = ebics_userids
|
|
||||||
|
if avail_formats and len(avail_formats) == 1:
|
||||||
|
self.format_id = avail_formats
|
||||||
|
else:
|
||||||
|
self.format_id = False
|
||||||
|
if avail_userids:
|
||||||
|
if len(avail_userids) == 1:
|
||||||
|
self.ebics_userid_id = avail_userids
|
||||||
|
else:
|
||||||
|
with_passphrs_userids = avail_userids.filtered(
|
||||||
|
lambda r: r.ebics_passphrase_store
|
||||||
|
)
|
||||||
|
if len(with_passphrs_userids) == 1:
|
||||||
|
self.ebics_userid_id = with_passphrs_userids
|
||||||
|
else:
|
||||||
|
self.ebics_userid_id = False
|
||||||
|
|
||||||
@api.onchange("upload_data")
|
@api.onchange("upload_data")
|
||||||
def _onchange_upload_data(self):
|
def _onchange_upload_data(self):
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
/>
|
/>
|
||||||
<field
|
<field
|
||||||
name="ebics_userid_id"
|
name="ebics_userid_id"
|
||||||
domain="[('ebics_config_id', '=', ebics_config_id)]"
|
domain="[('ebics_config_id', '=', ebics_config_id), ('user_ids.id', '=', uid), ('transaction_rights', 'in', ['both', 'down'])]"
|
||||||
required="1"
|
required="1"
|
||||||
options="{'no_create': True, 'no_open': True}"
|
options="{'no_create': True, 'no_open': True}"
|
||||||
/>
|
/>
|
||||||
@ -69,7 +69,7 @@
|
|||||||
/>
|
/>
|
||||||
<field
|
<field
|
||||||
name="ebics_userid_id"
|
name="ebics_userid_id"
|
||||||
domain="[('ebics_config_id', '=', ebics_config_id)]"
|
domain="[('ebics_config_id', '=', ebics_config_id), ('user_ids.id', '=', uid), ('transaction_rights', 'in', ['both', 'up'])]"
|
||||||
required="1"
|
required="1"
|
||||||
options="{'no_create': True, 'no_open': True}"
|
options="{'no_create': True, 'no_open': True}"
|
||||||
/>
|
/>
|
||||||
@ -143,7 +143,7 @@
|
|||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="ebics_xfer_action_download" model="ir.actions.act_window">
|
<record id="ebics_xfer_action_download" model="ir.actions.act_window">
|
||||||
<field name="name">EBICS File Transfer</field>
|
<field name="name">EBICS File Transfer - Download</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">ebics.xfer</field>
|
<field name="res_model">ebics.xfer</field>
|
||||||
<field name="view_mode">form</field>
|
<field name="view_mode">form</field>
|
||||||
@ -153,7 +153,7 @@
|
|||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="ebics_xfer_action_upload" model="ir.actions.act_window">
|
<record id="ebics_xfer_action_upload" model="ir.actions.act_window">
|
||||||
<field name="name">EBICS File Transfer</field>
|
<field name="name">EBICS File Transfer - Upload</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">ebics.xfer</field>
|
<field name="res_model">ebics.xfer</field>
|
||||||
<field name="view_mode">form</field>
|
<field name="view_mode">form</field>
|
||||||
|
Loading…
Reference in New Issue
Block a user