mirror of
https://github.com/brain-tec/account_ebics.git
synced 2024-11-22 04:02:03 +00:00
Merge pull request #28 from Noviat/13-imp-upload
ebics upload - select default format based upon suffix
This commit is contained in:
commit
f78c67a037
@ -73,7 +73,7 @@ We also recommend to consider the installation of the following modules:
|
|||||||
|
|
||||||
The import helper will match the local bank account number with the IBAN number specified on the Odoo Financial journal.
|
The import helper will match the local bank account number with the IBAN number specified on the Odoo Financial journal.
|
||||||
|
|
||||||
Cf. https://github.com/noviat-apps
|
Cf. https://github.com/Noviat/noviat-apps
|
||||||
|
|
||||||
|
|
|
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# Copyright 2009-2020 Noviat.
|
# Copyright 2009-2021 Noviat.
|
||||||
# License LGPL-3 or later (http://www.gnu.org/licenses/lpgl).
|
# License LGPL-3 or later (http://www.gnu.org/licenses/lpgl).
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'EBICS banking protocol',
|
'name': 'EBICS banking protocol',
|
||||||
'version': '13.0.1.3.0',
|
'version': '13.0.1.3.1',
|
||||||
'license': 'LGPL-3',
|
'license': 'LGPL-3',
|
||||||
'author': 'Noviat',
|
'author': 'Noviat',
|
||||||
'website': 'www.noviat.com',
|
'website': 'www.noviat.com',
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
<field name="type">up</field>
|
<field name="type">up</field>
|
||||||
<field name="order_type">FUL</field>
|
<field name="order_type">FUL</field>
|
||||||
<field name="description">Remises de LCR</field>
|
<field name="description">Remises de LCR</field>
|
||||||
<field name="suffix">lcr.dat</field>
|
<field name="suffix">txt</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="ebics_ff_CCT" model="ebics.file.format">
|
<record id="ebics_ff_CCT" model="ebics.file.format">
|
||||||
@ -99,7 +99,7 @@
|
|||||||
<field name="type">up</field>
|
<field name="type">up</field>
|
||||||
<field name="order_type">CCT</field>
|
<field name="order_type">CCT</field>
|
||||||
<field name="description">Payment Order in format pain.001.001.03</field>
|
<field name="description">Payment Order in format pain.001.001.03</field>
|
||||||
<field name="suffix">cct.xml</field>
|
<field name="suffix">xml</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="ebics_ff_XE2" model="ebics.file.format">
|
<record id="ebics_ff_XE2" model="ebics.file.format">
|
||||||
@ -107,7 +107,7 @@
|
|||||||
<field name="type">up</field>
|
<field name="type">up</field>
|
||||||
<field name="order_type">XE2</field>
|
<field name="order_type">XE2</field>
|
||||||
<field name="description">Payment Order in format pain.001.001.03</field>
|
<field name="description">Payment Order in format pain.001.001.03</field>
|
||||||
<field name="suffix">cct.xml</field>
|
<field name="suffix">xml</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="ebics_ff_CDD" model="ebics.file.format">
|
<record id="ebics_ff_CDD" model="ebics.file.format">
|
||||||
@ -115,7 +115,7 @@
|
|||||||
<field name="type">up</field>
|
<field name="type">up</field>
|
||||||
<field name="order_type">CDD</field>
|
<field name="order_type">CDD</field>
|
||||||
<field name="description">Sepa Core Direct Debit Order in format pain.008.001.02</field>
|
<field name="description">Sepa Core Direct Debit Order in format pain.008.001.02</field>
|
||||||
<field name="suffix">sdd.xml</field>
|
<field name="suffix">xml</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="ebics_ff_XE3" model="ebics.file.format">
|
<record id="ebics_ff_XE3" model="ebics.file.format">
|
||||||
@ -123,7 +123,7 @@
|
|||||||
<field name="type">up</field>
|
<field name="type">up</field>
|
||||||
<field name="order_type">XE3</field>
|
<field name="order_type">XE3</field>
|
||||||
<field name="description">Sepa Core Direct Debit Order in format pain.008.001.02</field>
|
<field name="description">Sepa Core Direct Debit Order in format pain.008.001.02</field>
|
||||||
<field name="suffix">sdd.xml</field>
|
<field name="suffix">xml</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="ebics_ff_CDB" model="ebics.file.format">
|
<record id="ebics_ff_CDB" model="ebics.file.format">
|
||||||
@ -131,7 +131,7 @@
|
|||||||
<field name="type">up</field>
|
<field name="type">up</field>
|
||||||
<field name="order_type">CDB</field>
|
<field name="order_type">CDB</field>
|
||||||
<field name="description">Sepa Direct Debit (B2B) Order in format pain.008.001.02</field>
|
<field name="description">Sepa Direct Debit (B2B) Order in format pain.008.001.02</field>
|
||||||
<field name="suffix">sbb.xml</field>
|
<field name="suffix">xml</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="ebics_ff_XE4" model="ebics.file.format">
|
<record id="ebics_ff_XE4" model="ebics.file.format">
|
||||||
@ -139,7 +139,7 @@
|
|||||||
<field name="type">up</field>
|
<field name="type">up</field>
|
||||||
<field name="order_type">XE4</field>
|
<field name="order_type">XE4</field>
|
||||||
<field name="description">Sepa Direct Debit (B2B) Order in format pain.008.001.02</field>
|
<field name="description">Sepa Direct Debit (B2B) Order in format pain.008.001.02</field>
|
||||||
<field name="suffix">sbb.xml</field>
|
<field name="suffix">xml</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="ebics_ff_FUL_pain_001_001_02_sct" model="ebics.file.format">
|
<record id="ebics_ff_FUL_pain_001_001_02_sct" model="ebics.file.format">
|
||||||
@ -147,7 +147,7 @@
|
|||||||
<field name="type">up</field>
|
<field name="type">up</field>
|
||||||
<field name="order_type">FUL</field>
|
<field name="order_type">FUL</field>
|
||||||
<field name="description">Payment Order in format pain.001.001.02</field>
|
<field name="description">Payment Order in format pain.001.001.02</field>
|
||||||
<field name="suffix">cct.xml</field>
|
<field name="suffix">xml</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
|
@ -411,7 +411,7 @@ ul.auto-toc {
|
|||||||
<li><p class="first">account_bank_statement_import_helper</p>
|
<li><p class="first">account_bank_statement_import_helper</p>
|
||||||
<p>Required if you are processing bank statements with local bank account numbers (e.g. french CFONB files).</p>
|
<p>Required if you are processing bank statements with local bank account numbers (e.g. french CFONB files).</p>
|
||||||
<p>The import helper will match the local bank account number with the IBAN number specified on the Odoo Financial journal.</p>
|
<p>The import helper will match the local bank account number with the IBAN number specified on the Odoo Financial journal.</p>
|
||||||
<p>Cf. <a class="reference external" href="https://github.com/noviat-apps">https://github.com/noviat-apps</a></p>
|
<p>Cf. <a class="reference external" href="https://github.com/Noviat/noviat-apps">https://github.com/Noviat/noviat-apps</a></p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="line-block">
|
<div class="line-block">
|
||||||
|
@ -123,12 +123,17 @@ class EbicsXfer(models.TransientModel):
|
|||||||
@api.onchange('upload_data')
|
@api.onchange('upload_data')
|
||||||
def _onchange_upload_data(self):
|
def _onchange_upload_data(self):
|
||||||
self.upload_fname_dummy = self.upload_fname
|
self.upload_fname_dummy = self.upload_fname
|
||||||
|
self.format_id = False
|
||||||
self._detect_upload_format()
|
self._detect_upload_format()
|
||||||
upload_formats = self.format_id \
|
if not self.format_id:
|
||||||
or self.ebics_config_id.ebics_file_format_ids.filtered(
|
upload_formats = self.format_id \
|
||||||
lambda r: r.type == 'up')
|
or self.ebics_config_id.ebics_file_format_ids.filtered(
|
||||||
if len(upload_formats) == 1:
|
lambda r: r.type == 'up')
|
||||||
self.format_id = upload_formats
|
if len(upload_formats) > 1:
|
||||||
|
upload_formats = upload_formats.filtered(
|
||||||
|
lambda r: self.upload_fname.endswith(r.suffix))
|
||||||
|
if len(upload_formats) == 1:
|
||||||
|
self.format_id = upload_formats
|
||||||
|
|
||||||
@api.onchange('format_id')
|
@api.onchange('format_id')
|
||||||
def _onchange_format_id(self):
|
def _onchange_format_id(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user