mirror of
https://github.com/brain-tec/account_ebics.git
synced 2026-08-06 14:42:37 +00:00
[IMP] account_ebics_batch_payment: pre-fill EBICS file format from payment method
This commit is contained in:
@@ -17,7 +17,7 @@ addon | version | maintainers | summary
|
||||
--- | --- | --- | ---
|
||||
[account_ebics](account_ebics/) | 18.0.1.2.1 | | EBICS banking protocol
|
||||
[account_ebics_batch](account_ebics_batch/) | 18.0.1.0.1 | | EBICS Files automated import and processing
|
||||
[account_ebics_batch_payment](account_ebics_batch_payment/) | 18.0.1.1.0 | | Upload Batch Payment via EBICS
|
||||
[account_ebics_batch_payment](account_ebics_batch_payment/) | 18.0.1.2.0 | | Upload Batch Payment via EBICS
|
||||
[account_ebics_oca_statement_import](account_ebics_oca_statement_import/) | 18.0.1.0.1 | | Use OCA Bank Statement Import with account_ebics
|
||||
[account_ebics_oe](account_ebics_oe/) | 18.0.1.0.0 | | Deploy account_ebics module on Odoo Enterprise
|
||||
[account_ebics_payment_order](account_ebics_payment_order/) | 18.0.1.2.0 | | Upload Payment Order via EBICS
|
||||
|
||||
@@ -3,13 +3,16 @@
|
||||
|
||||
{
|
||||
"name": "Upload Batch Payment via EBICS",
|
||||
"version": "18.0.1.1.0",
|
||||
"version": "18.0.1.2.0",
|
||||
"license": "LGPL-3",
|
||||
"author": "Noviat",
|
||||
"website": "https://www.noviat.com/",
|
||||
"category": "Accounting & Finance",
|
||||
"depends": ["account_ebics", "account_batch_payment"],
|
||||
"data": ["views/account_batch_payment_views.xml"],
|
||||
"data": [
|
||||
"views/account_journal_views.xml",
|
||||
"views/account_batch_payment_views.xml",
|
||||
],
|
||||
"installable": True,
|
||||
"images": ["static/description/cover.png"],
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
from . import account_batch_payment
|
||||
from . import account_batch_payment, account_payment_method
|
||||
|
||||
@@ -49,6 +49,8 @@ class AccountBatchPayment(models.Model):
|
||||
)
|
||||
ebics_xfer._onchange_ebics_config_id()
|
||||
ebics_xfer._onchange_upload_data()
|
||||
if not ebics_xfer.format_id and self.payment_method_id.ebics_file_format_id:
|
||||
ebics_xfer.format_id = self.payment_method_id.ebics_file_format_id
|
||||
view = self.env.ref("account_ebics.ebics_xfer_view_form_upload")
|
||||
act = {
|
||||
"name": self.env._("EBICS Upload"),
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# Copyright 2025 Noviat.
|
||||
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class AccountPaymentMethod(models.Model):
|
||||
_inherit = "account.payment.method"
|
||||
|
||||
ebics_file_format_id = fields.Many2one(
|
||||
comodel_name="ebics.file.format",
|
||||
string="EBICS File Format",
|
||||
help="EBICS file format to pre-select when uploading a batch payment "
|
||||
"that uses this payment method.",
|
||||
)
|
||||
|
||||
|
||||
class AccountPaymentMethodLine(models.Model):
|
||||
_inherit = "account.payment.method.line"
|
||||
|
||||
ebics_file_format_id = fields.Many2one(
|
||||
comodel_name="ebics.file.format",
|
||||
related="payment_method_id.ebics_file_format_id",
|
||||
readonly=False,
|
||||
string="EBICS File Format",
|
||||
)
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_account_journal_form_ebics_payment_method" model="ir.ui.view">
|
||||
<field name="name">account.journal.form.ebics.payment.method</field>
|
||||
<field name="model">account.journal</field>
|
||||
<field name="inherit_id" ref="account.view_account_journal_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//field[@name='inbound_payment_method_line_ids']//list"
|
||||
position="inside"
|
||||
>
|
||||
<field
|
||||
name="ebics_file_format_id"
|
||||
optional="hide"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//field[@name='outbound_payment_method_line_ids']//list"
|
||||
position="inside"
|
||||
>
|
||||
<field
|
||||
name="ebics_file_format_id"
|
||||
optional="hide"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user