mirror of
				https://github.com/brain-tec/account_ebics.git
				synced 2025-11-04 07:00:35 +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_ebics
 | 
				
			||||||
- account_payment_order
 | 
					- account_payment_order
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Configuration
 | 
				
			||||||
 | 
					=============
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Set the EBICS File Format on your Payment Modes.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Usage
 | 
					Usage
 | 
				
			||||||
=====
 | 
					=====
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Create your Payment Order and generate the bank file.
 | 
					Create your Payment Order and generate the bank file.
 | 
				
			||||||
Upload the generated file via the 'EBICS Upload' button on the payment order.
 | 
					Upload the generated file via the 'EBICS Upload' button on the payment order.
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    "name": "Upload Payment Order via EBICS",
 | 
					    "name": "Upload Payment Order via EBICS",
 | 
				
			||||||
    "version": "17.0.1.0.1",
 | 
					    "version": "17.0.1.1.0",
 | 
				
			||||||
    "license": "LGPL-3",
 | 
					    "license": "LGPL-3",
 | 
				
			||||||
    "author": "Noviat",
 | 
					    "author": "Noviat",
 | 
				
			||||||
    "website": "https://www.noviat.com",
 | 
					    "website": "https://www.noviat.com",
 | 
				
			||||||
@@ -11,6 +11,7 @@
 | 
				
			|||||||
    "depends": ["account_ebics", "account_payment_order"],
 | 
					    "depends": ["account_ebics", "account_payment_order"],
 | 
				
			||||||
    "data": [
 | 
					    "data": [
 | 
				
			||||||
        "views/account_payment_order_views.xml",
 | 
					        "views/account_payment_order_views.xml",
 | 
				
			||||||
 | 
					        "views/account_payment_mode_views.xml",
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
    "images": ["static/description/cover.png"],
 | 
					    "images": ["static/description/cover.png"],
 | 
				
			||||||
    "installable": True,
 | 
					    "installable": True,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1 +1,2 @@
 | 
				
			|||||||
 | 
					from . import account_payment_mode
 | 
				
			||||||
from . import account_payment_order
 | 
					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_data": attach.datas,
 | 
				
			||||||
                    "default_upload_fname": attach.name,
 | 
					                    "default_upload_fname": attach.name,
 | 
				
			||||||
                    "origin": origin,
 | 
					                    "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_ebics_config_id()
 | 
				
			||||||
            ebics_xfer._onchange_upload_data()
 | 
					            ebics_xfer._onchange_upload_data()
 | 
				
			||||||
            view = self.env.ref("account_ebics.ebics_xfer_view_form_upload")
 | 
					            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="inherit_id" ref="account_payment_mode.account_payment_mode_form" />
 | 
				
			||||||
        <field name="arch" type="xml">
 | 
					        <field name="arch" type="xml">
 | 
				
			||||||
            <field name="payment_type" position="after">
 | 
					            <field name="payment_type" position="after">
 | 
				
			||||||
                <field
 | 
					                <field name="ebics_format_id" invisible="not payment_order_ok" />
 | 
				
			||||||
                    name="ebics_format_id"
 | 
					 | 
				
			||||||
                    attrs="{'invisible': [('payment_order_ok', '=', False)]}"
 | 
					 | 
				
			||||||
                />
 | 
					 | 
				
			||||||
            </field>
 | 
					            </field>
 | 
				
			||||||
        </field>
 | 
					        </field>
 | 
				
			||||||
    </record>
 | 
					    </record>
 | 
				
			||||||
		Reference in New Issue
	
	Block a user