mirror of
https://github.com/brain-tec/account_ebics.git
synced 2025-08-14 14:45:36 +00:00
[IMP]EBICS File Format on Payment Mode
This commit is contained in:
@@ -1 +1,2 @@
|
||||
from . import account_payment_mode
|
||||
from . import account_payment_order
|
||||
|
15
account_ebics_payment_order/models/account_payment_mode.py
Normal file
15
account_ebics_payment_order/models/account_payment_mode.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright 2009-2024 Noviat.
|
||||
# License LGPL-3 or later (http://www.gnu.org/licenses/lpgl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class AccountPaymentMode(models.Model):
|
||||
_inherit = "account.payment.mode"
|
||||
|
||||
ebics_format_id = fields.Many2one(
|
||||
comodel_name="ebics.file.format",
|
||||
string="EBICS File Format",
|
||||
domain="[('type', '=', 'up')]",
|
||||
help="Select EBICS File Format to upload.",
|
||||
)
|
@@ -63,10 +63,14 @@ class AccountPaymentOrder(models.Model):
|
||||
"default_upload_data": attach.datas,
|
||||
"default_upload_fname": attach.name,
|
||||
"origin": origin,
|
||||
"force_company": self.company_id.id,
|
||||
}
|
||||
)
|
||||
ebics_xfer = self.env["ebics.xfer"].with_context(**ctx).create({})
|
||||
ebics_xfer = (
|
||||
self.env["ebics.xfer"]
|
||||
.with_company(self.company_id)
|
||||
.with_context(**ctx)
|
||||
.create({})
|
||||
)
|
||||
ebics_xfer._onchange_ebics_config_id()
|
||||
ebics_xfer._onchange_upload_data()
|
||||
view = self.env.ref("account_ebics.ebics_xfer_view_form_upload")
|
||||
|
Reference in New Issue
Block a user