mirror of
				https://github.com/brain-tec/account_ebics.git
				synced 2025-11-03 22:50:59 +00:00 
			
		
		
		
	[IMP]EBICS File Format on Payment Mode
This commit is contained in:
		@@ -16,9 +16,13 @@ This module depends upon the following modules (cf. apps.odoo.com):
 | 
			
		||||
- account_ebics
 | 
			
		||||
- account_payment_order
 | 
			
		||||
 | 
			
		||||
Configuration
 | 
			
		||||
=============
 | 
			
		||||
 | 
			
		||||
Set the EBICS File Format on your Payment Modes.
 | 
			
		||||
 | 
			
		||||
Usage
 | 
			
		||||
=====
 | 
			
		||||
 | 
			
		||||
Create your Payment Order and generate the bank file.
 | 
			
		||||
Upload the generated file via the 'EBICS Upload' button on the payment order.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,7 @@
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
    "name": "Upload Payment Order via EBICS",
 | 
			
		||||
    "version": "17.0.1.0.1",
 | 
			
		||||
    "version": "17.0.1.1.0",
 | 
			
		||||
    "license": "LGPL-3",
 | 
			
		||||
    "author": "Noviat",
 | 
			
		||||
    "website": "https://www.noviat.com",
 | 
			
		||||
@@ -11,6 +11,7 @@
 | 
			
		||||
    "depends": ["account_ebics", "account_payment_order"],
 | 
			
		||||
    "data": [
 | 
			
		||||
        "views/account_payment_order_views.xml",
 | 
			
		||||
        "views/account_payment_mode_views.xml",
 | 
			
		||||
    ],
 | 
			
		||||
    "images": ["static/description/cover.png"],
 | 
			
		||||
    "installable": True,
 | 
			
		||||
 
 | 
			
		||||
@@ -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")
 | 
			
		||||
 
 | 
			
		||||
@@ -7,10 +7,7 @@
 | 
			
		||||
        <field name="inherit_id" ref="account_payment_mode.account_payment_mode_form" />
 | 
			
		||||
        <field name="arch" type="xml">
 | 
			
		||||
            <field name="payment_type" position="after">
 | 
			
		||||
                <field
 | 
			
		||||
                    name="ebics_format_id"
 | 
			
		||||
                    attrs="{'invisible': [('payment_order_ok', '=', False)]}"
 | 
			
		||||
                />
 | 
			
		||||
                <field name="ebics_format_id" invisible="not payment_order_ok" />
 | 
			
		||||
            </field>
 | 
			
		||||
        </field>
 | 
			
		||||
    </record>
 | 
			
		||||
		Reference in New Issue
	
	Block a user