[IMP] account_ebics: hide process button on ebics_file when no download process

This commit is contained in:
Luc De Meyer 2025-01-03 15:01:54 +01:00
parent 49c764d7d4
commit 250f5bcc3c
14 changed files with 453 additions and 389 deletions

View File

@ -1,4 +1,4 @@
# Copyright 2009-2024 Noviat.
# Copyright 2009-2025 Noviat.
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
{

View File

@ -0,0 +1,15 @@
# Copyright 2009-2025 Noviat.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
def migrate(cr, version):
cr.execute( # pylint: disable=E8103
"""
UPDATE ebics_file ef
SET state = 'done'
FROM ebics_file_format eff
WHERE ef.format_id = eff.id
AND eff.type = 'down'
AND eff.download_process_method IS NULL;
"""
)

View File

@ -1,4 +1,4 @@
# Copyright 2009-2024 Noviat.
# Copyright 2009-2025 Noviat.
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
import base64
@ -36,7 +36,10 @@ class EbicsFile(models.Model):
format_id = fields.Many2one(
comodel_name="ebics.file.format", string="EBICS File Formats", readonly=True
)
type = fields.Selection(related="format_id.type", readonly=True)
download_process_method = fields.Selection(
related="format_id.download_process_method"
)
type = fields.Selection(related="format_id.type")
date_from = fields.Date(
readonly=True, help="'Date From' as entered in the download wizard."
)

View File

@ -1,40 +1,40 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record model="res.groups" id="group_ebics_manager">
<field name="name">EBICS Manager</field>
<field name="category_id" ref="base.module_category_hidden" />
</record>
<data noupdate="1">
<record id="ebics_config_comp_rule" model="ir.rule">
<field name="name">EBICS Configuration model company rule</field>
<field name="model_id" ref="model_ebics_config" />
<field eval="True" name="global" />
<field
name="domain_force"
>['|', ('company_ids', '=', False), ('company_ids', 'in', user.company_ids.ids)]</field>
<record model="res.groups" id="group_ebics_manager">
<field name="name">EBICS Manager</field>
<field name="category_id" ref="base.module_category_hidden" />
</record>
<record id="ebics_userid_comp_rule" model="ir.rule">
<field name="name">EBICS UserID model company rule</field>
<field name="model_id" ref="model_ebics_userid" />
<field eval="True" name="global" />
<field
<data noupdate="1">
<record id="ebics_config_comp_rule" model="ir.rule">
<field name="name">EBICS Configuration model company rule</field>
<field name="model_id" ref="model_ebics_config" />
<field eval="True" name="global" />
<field
name="domain_force"
>['|', ('company_ids', '=', False), ('company_ids', 'in', user.company_ids.ids)]</field>
</record>
</record>
<record id="ebics_file_comp_rule" model="ir.rule">
<field name="name">EBICS File model company rule</field>
<field name="model_id" ref="model_ebics_file" />
<field eval="True" name="global" />
<field
<record id="ebics_userid_comp_rule" model="ir.rule">
<field name="name">EBICS UserID model company rule</field>
<field name="model_id" ref="model_ebics_userid" />
<field eval="True" name="global" />
<field
name="domain_force"
>['|', ('company_ids', '=', False), ('company_ids', 'in', user.company_ids.ids)]</field>
</record>
</record>
</data>
<record id="ebics_file_comp_rule" model="ir.rule">
<field name="name">EBICS File model company rule</field>
<field name="model_id" ref="model_ebics_file" />
<field eval="True" name="global" />
<field
name="domain_force"
>['|', ('company_ids', '=', False), ('company_ids', 'in', user.company_ids.ids)]</field>
</record>
</data>
</odoo>

View File

@ -1,26 +1,26 @@
<?xml version="1.0" ?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="ebics_config_view_list" model="ir.ui.view">
<field name="name">ebics.config.list</field>
<field name="model">ebics.config</field>
<field name="arch" type="xml">
<list decoration-muted="state == 'draft'">
<field name="name" />
<field name="ebics_host" />
<field name="state" />
<field name="active" />
</list>
</field>
</record>
<record id="ebics_config_view_list" model="ir.ui.view">
<field name="name">ebics.config.list</field>
<field name="model">ebics.config</field>
<field name="arch" type="xml">
<list decoration-muted="state == 'draft'">
<field name="name" />
<field name="ebics_host" />
<field name="state" />
<field name="active" />
</list>
</field>
</record>
<record id="ebics_config_view_form" model="ir.ui.view">
<field name="name">ebics.config.form</field>
<field name="model">ebics.config</field>
<field name="arch" type="xml">
<form string="EBICS Configuration">
<header>
<button
<record id="ebics_config_view_form" model="ir.ui.view">
<field name="name">ebics.config.form</field>
<field name="model">ebics.config</field>
<field name="arch" type="xml">
<form string="EBICS Configuration">
<header>
<button
name="set_to_draft"
invisible="state != 'confirm'"
string="Set to Draft"
@ -28,7 +28,7 @@
groups="account_ebics.group_ebics_manager"
help="Set to Draft in order to change the EBICS configuration parameters."
/>
<button
<button
name="set_to_confirm"
invisible="state != 'draft'"
string="Confirm"
@ -37,56 +37,65 @@
groups="account_ebics.group_ebics_manager"
help="The EBICS configuration must be confirmed before it can used for bank transactions."
/>
<field name="state" widget="statusbar" />
</header>
<widget
<field name="state" widget="statusbar" />
</header>
<widget
name="web_ribbon"
text="Archived"
bg_color="bg-danger"
invisible="active"
/>
<group name="main">
<group name="main-left">
<field name="name" readonly="state != 'draft'" colspan="2" />
<field name="ebics_host" readonly="state != 'draft'" />
<field name="ebics_url" readonly="state != 'draft'" />
<field name="ebics_partner" readonly="state != 'draft'" />
<field name="ebics_keys" readonly="state != 'draft'" />
</group>
<group name="main-right">
<field
<group name="main">
<group name="main-left">
<field name="name" readonly="state != 'draft'" colspan="2" />
<field name="ebics_host" readonly="state != 'draft'" />
<field name="ebics_url" readonly="state != 'draft'" />
<field name="ebics_partner" readonly="state != 'draft'" />
<field name="ebics_keys" readonly="state != 'draft'" />
</group>
<group name="main-right">
<field
name="journal_ids"
readonly="state != 'draft'"
widget="many2many_tags"
options="{'no_create': True}"
/>
<field name="ebics_version" readonly="state != 'draft'" />
<field name="ebics_key_version" readonly="state != 'draft'" />
<field name="ebics_key_bitlength" readonly="state != 'draft'" />
<field
<field name="ebics_version" readonly="state != 'draft'" />
<field name="ebics_key_version" readonly="state != 'draft'" />
<field name="ebics_key_bitlength" readonly="state != 'draft'" />
<field
name="order_number"
invisible="ebics_version != 'H003'"
readonly="state != 'draft'"
/>
</group>
</group>
<notebook>
<page string="EBICS Users" groups="account_ebics.group_ebics_manager">
<field name="ebics_userid_ids" readonly="state != 'draft'" />
</page>
<page string="File Formats" groups="account_ebics.group_ebics_manager">
<field name="ebics_file_format_ids" readonly="state != 'draft'" />
</page>
</notebook>
</form>
</field>
</record>
</group>
</group>
<notebook>
<page
string="EBICS Users"
groups="account_ebics.group_ebics_manager"
>
<field name="ebics_userid_ids" readonly="state != 'draft'" />
</page>
<page
string="File Formats"
groups="account_ebics.group_ebics_manager"
>
<field
name="ebics_file_format_ids"
readonly="state != 'draft'"
/>
</page>
</notebook>
</form>
</field>
</record>
<record id="ebics_config_action" model="ir.actions.act_window">
<field name="name">EBICS Configuration</field>
<field name="res_model">ebics.config</field>
<field name="view_mode">list,form</field>
<field name="context">{'active_test': False}</field>
</record>
<record id="ebics_config_action" model="ir.actions.act_window">
<field name="name">EBICS Configuration</field>
<field name="res_model">ebics.config</field>
<field name="view_mode">list,form</field>
<field name="context">{'active_test': False}</field>
</record>
</odoo>

View File

@ -1,74 +1,74 @@
<?xml version="1.0" ?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="ebics_file_format_view_list" model="ir.ui.view">
<field name="name">ebics.file.format.list</field>
<field name="model">ebics.file.format</field>
<field name="arch" type="xml">
<list>
<field name="ebics_version" />
<field name="type" />
<field name="order_type" />
<field name="signature_class" />
<field name="name" />
<field name="description" />
</list>
</field>
</record>
<record id="ebics_file_format_view_list" model="ir.ui.view">
<field name="name">ebics.file.format.list</field>
<field name="model">ebics.file.format</field>
<field name="arch" type="xml">
<list>
<field name="ebics_version" />
<field name="type" />
<field name="order_type" />
<field name="signature_class" />
<field name="name" />
<field name="description" />
</list>
</field>
</record>
<record id="ebics_file_format_view_form" model="ir.ui.view">
<field name="name">ebics.file.format.form</field>
<field name="model">ebics.file.format</field>
<field name="arch" type="xml">
<form string="EBICS File Format">
<group name="main">
<group name="main-left">
<field name="ebics_version" />
<field name="type" />
<field name="suffix" />
<field
<record id="ebics_file_format_view_form" model="ir.ui.view">
<field name="name">ebics.file.format.form</field>
<field name="model">ebics.file.format</field>
<field name="arch" type="xml">
<form string="EBICS File Format">
<group name="main">
<group name="main-left">
<field name="ebics_version" />
<field name="type" />
<field name="suffix" />
<field
name="download_process_method"
invisible="type == 'up'"
force_save="1"
/>
<field name="signature_class" />
</group>
<group name="main-right">
<field name="order_type" />
<field
<field name="signature_class" />
</group>
<group name="main-right">
<field name="order_type" />
<field
name="name"
required="ebics_version == '2'"
invisible="ebics_version == '3'"
/>
<field
<field
name="btf_service"
required="ebics_version == '3'"
invisible="ebics_version == '2'"
/>
<field
<field
name="btf_message"
required="ebics_version == '3'"
invisible="ebics_version == '2'"
/>
<field name="btf_scope" invisible="ebics_version == '2'" />
<field name="btf_option" invisible="ebics_version == '2'" />
<field name="btf_container" invisible="ebics_version == '2'" />
<field name="btf_version" invisible="ebics_version == '2'" />
<field name="btf_variant" invisible="ebics_version == '2'" />
<field name="btf_format" invisible="ebics_version == '2'" />
</group>
</group>
<group name="description">
<field name="description" />
</group>
</form>
</field>
</record>
<field name="btf_scope" invisible="ebics_version == '2'" />
<field name="btf_option" invisible="ebics_version == '2'" />
<field name="btf_container" invisible="ebics_version == '2'" />
<field name="btf_version" invisible="ebics_version == '2'" />
<field name="btf_variant" invisible="ebics_version == '2'" />
<field name="btf_format" invisible="ebics_version == '2'" />
</group>
</group>
<group name="description">
<field name="description" />
</group>
</form>
</field>
</record>
<record id="ebics_file_format_action" model="ir.actions.act_window">
<field name="name">EBICS File Formats</field>
<field name="res_model">ebics.file.format</field>
<field name="view_mode">list,form</field>
</record>
<record id="ebics_file_format_action" model="ir.actions.act_window">
<field name="name">EBICS File Formats</field>
<field name="res_model">ebics.file.format</field>
<field name="view_mode">list,form</field>
</record>
</odoo>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" ?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="ebics_file_view_search" model="ir.ui.view">
@ -77,9 +77,10 @@
<field name="arch" type="xml">
<form string="EBICS File" create="false">
<header>
<field name="download_process_method" invisible="1" />
<button
name="set_to_draft"
invisible="state != 'done'"
invisible="not download_process_method or state != 'done'"
string="Set to Draft"
type="object"
groups="account.group_account_manager"
@ -87,7 +88,7 @@
<button
name="process"
class="oe_highlight"
invisible="state != 'draft'"
invisible="not download_process_method or state != 'draft'"
string="Process"
type="object"
groups="account.group_account_invoice"
@ -95,27 +96,37 @@
/>
<button
name="set_to_done"
invisible="state != 'draft'"
invisible="not download_process_method or state != 'draft'"
string="Set to Done"
type="object"
groups="account.group_account_manager"
/>
<field name="state" widget="statusbar" />
</header>
<group colspan="4" col="4">
<field name="date" string="Download Date" />
<field name="name" />
<field name="data" filename="name" />
<field name="format_id" />
<field name="date_from" />
<field name="date_to" />
<field name="user_id" />
<field name="ebics_userid_id" />
<field
name="company_ids"
widget="many2many_tags"
groups="base.group_multi_company"
name="state"
widget="statusbar"
invisible="not download_process_method"
/>
</header>
<group name="main">
<group name="main-full-screen" colspan="2" col="2">
<field name="name" />
<field name="data" filename="name" />
<field name="format_id" />
</group>
<group name="main-left">
<field name="date" string="Download Date" />
<field name="user_id" />
<field name="ebics_userid_id" />
</group>
<group name="main-right">
<field name="date_from" />
<field name="date_to" />
<field
name="company_ids"
widget="many2many_tags"
groups="base.group_multi_company"
/>
</group>
</group>
<notebook>
<page string="Additional Information">

View File

@ -1,26 +1,26 @@
<?xml version="1.0" ?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="ebics_userid_view_list" model="ir.ui.view">
<field name="name">ebics.userid.list</field>
<field name="model">ebics.userid</field>
<field name="arch" type="xml">
<list decoration-muted="state != 'active_keys'">
<field name="name" />
<field name="signature_class" />
<field name="state" />
<field name="active" />
</list>
</field>
</record>
<record id="ebics_userid_view_list" model="ir.ui.view">
<field name="name">ebics.userid.list</field>
<field name="model">ebics.userid</field>
<field name="arch" type="xml">
<list decoration-muted="state != 'active_keys'">
<field name="name" />
<field name="signature_class" />
<field name="state" />
<field name="active" />
</list>
</field>
</record>
<record id="ebics_userid_view_form" model="ir.ui.view">
<field name="name">ebics.userid.form</field>
<field name="model">ebics.userid</field>
<field name="arch" type="xml">
<form string="EBICS UserID">
<header>
<button
<record id="ebics_userid_view_form" model="ir.ui.view">
<field name="name">ebics.userid.form</field>
<field name="model">ebics.userid</field>
<field name="arch" type="xml">
<form string="EBICS UserID">
<header>
<button
name="ebics_init_1"
invisible="state != 'draft'"
string="EBICS Initialisation"
@ -28,7 +28,7 @@
class="oe_highlight"
help="Initialise EBICS Bank Keys"
/>
<button
<button
name="ebics_init_2"
invisible="state != 'init'"
string="Account activated"
@ -36,7 +36,7 @@
class="oe_highlight"
help="EBICS Initialisation - Push this button when the account has been activated by the bank."
/>
<button
<button
name="ebics_init_3"
invisible="state != 'get_bank_keys'"
string="Get Bank Keys"
@ -44,7 +44,7 @@
class="oe_highlight"
help="EBICS Initialisation - After the account has been activated the public bank keys must be downloaded and checked for consistency."
/>
<button
<button
name="ebics_init_4"
invisible="state != 'to_verify'"
string="Bank Keys Verified"
@ -52,113 +52,133 @@
class="oe_highlight"
help="EBICS Initialisation - Push this button when the public have been checked for consistency."
/>
<button
<button
name="change_passphrase"
string="Change Passphrase"
type="object"
class="oe_highlight"
invisible="not ebics_keys_found or state != 'active_keys'"
/>
<button
<button
name="set_to_draft"
invisible="state != 'active_keys'"
string="Set to Draft"
type="object"
help="Set to Draft in order to reinitialize your bank connection."
/>
<button
<button
name="set_to_get_bank_keys"
invisible="state != 'active_keys'"
string="Renew Bank Keys"
type="object"
help="Use this button to update the EBICS certificates of your bank."
/>
<button
<button
name="set_to_active_keys"
invisible="state != 'draft'"
string="Force Active Keys"
type="object"
help="Use this button to bypass the EBICS initialization (e.g. in case you have manually transferred active EBICS keys from another system."
/>
<field name="state" widget="statusbar" />
</header>
<group name="main" readonly="state != 'draft'">
<group name="main-left">
<field name="name" readonly="state != 'draft'" />
<field
<field name="state" widget="statusbar" />
</header>
<group name="main" readonly="state != 'draft'">
<group name="main-left">
<field name="name" readonly="state != 'draft'" />
<field
name="ebics_passphrase"
password="True"
required="ebics_passphrase_required"
invisible="ebics_passphrase_invisible"
/>
<field
<field
name="ebics_passphrase_store"
readonly="ebics_passphrase_store_readonly"
/>
<field
<field
name="ebics_sig_passphrase"
password="True"
invisible="ebics_sig_passphrase_invisible"
/>
<field name="transaction_rights" />
<field name="active" />
</group>
<group name="main-right">
<field name="signature_class" readonly="state != 'draft'" />
<field
<field name="transaction_rights" />
<field name="active" />
</group>
<group name="main-right">
<field name="signature_class" readonly="state != 'draft'" />
<field
name="user_ids"
widget="many2many_tags"
options="{'no_create': True}"
/>
<!-- TODO: restore these fields after implementation of SWIFT SConnect
<field
name="swift_3skey"
invisible="signature_class == 'T'"
/>
<field name="swift_3skey_certificate_fn" invisible="1" />
<field
name="swift_3skey_certificate"
filename="swift_3skey_certificate_fn"
invisible="not swift_3skey"
required="swift_3skey"
/>
-->
<field name="ebics_key_x509" readonly="state != 'draft'" />
</group>
</group>
<group name="dn" invisible="not ebics_key_x509" readonly="state != 'draft'">
<div colspan="2" col="1">
<strong
<!-- TODO: restore these fields after implementation of SWIFT SConnect
<field
name="swift_3skey"
invisible="signature_class == 'T'"
/>
<field name="swift_3skey_certificate_fn" invisible="1" />
<field
name="swift_3skey_certificate"
filename="swift_3skey_certificate_fn"
invisible="not swift_3skey"
required="swift_3skey"
/>
-->
<field name="ebics_key_x509" readonly="state != 'draft'" />
</group>
</group>
<group
name="dn"
invisible="not ebics_key_x509"
readonly="state != 'draft'"
>
<div colspan="2" col="1">
<strong
>Distinguished Name attributes used to create self-signed X.509 certificates:</strong>
</div>
<group name="dn_l">
<field name="ebics_key_x509_dn_cn" readonly="state != 'draft'" />
<field name="ebics_key_x509_dn_o" readonly="state != 'draft'" />
<field name="ebics_key_x509_dn_l" readonly="state != 'draft'" />
<field name="ebics_key_x509_dn_c" readonly="state != 'draft'" />
</group>
<group name="dn_r">
<field name="ebics_key_x509_dn_e" readonly="state != 'draft'" />
<field name="ebics_key_x509_dn_ou" readonly="state != 'draft'" />
<field name="ebics_key_x509_dn_st" readonly="state != 'draft'" />
</group>
</group>
<group name="files">
<group colspan="2" name="ebics_ini_letter" invisible="not ebics_ini_letter">
<field name="ebics_ini_letter_fn" invisible="1" />
<field name="ebics_ini_letter" filename="ebics_ini_letter_fn" />
</group>
<group
</div>
<group name="dn_l">
<field
name="ebics_key_x509_dn_cn"
readonly="state != 'draft'"
/>
<field name="ebics_key_x509_dn_o" readonly="state != 'draft'" />
<field name="ebics_key_x509_dn_l" readonly="state != 'draft'" />
<field name="ebics_key_x509_dn_c" readonly="state != 'draft'" />
</group>
<group name="dn_r">
<field name="ebics_key_x509_dn_e" readonly="state != 'draft'" />
<field
name="ebics_key_x509_dn_ou"
readonly="state != 'draft'"
/>
<field
name="ebics_key_x509_dn_st"
readonly="state != 'draft'"
/>
</group>
</group>
<group name="files">
<group
colspan="2"
name="ebics_ini_letter"
invisible="not ebics_ini_letter"
>
<field name="ebics_ini_letter_fn" invisible="1" />
<field name="ebics_ini_letter" filename="ebics_ini_letter_fn" />
</group>
<group
colspan="2"
name="ebics_public_bank_keys"
invisible="not ebics_public_bank_keys"
>
<field name="ebics_public_bank_keys_fn" invisible="1" />
<field name="ebics_public_bank_keys" filename="ebics_public_bank_keys_fn" />
</group>
</group>
</form>
</field>
</record>
<field name="ebics_public_bank_keys_fn" invisible="1" />
<field
name="ebics_public_bank_keys"
filename="ebics_public_bank_keys_fn"
/>
</group>
</group>
</form>
</field>
</record>
</odoo>

View File

@ -1,14 +1,14 @@
<?xml version="1.0" ?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<menuitem
<menuitem
id="ebics_processing_menu"
name="EBICS Processing"
parent="account.menu_finance"
sequence="4"
/>
<menuitem
<menuitem
id="ebics_xfer_menu_download"
name="EBICS Download"
parent="ebics_processing_menu"
@ -16,7 +16,7 @@
sequence="10"
/>
<menuitem
<menuitem
id="ebics_xfer_menu_upload"
name="EBICS Upload"
parent="ebics_processing_menu"
@ -24,14 +24,14 @@
sequence="20"
/>
<menuitem
<menuitem
id="ebics_file_menu"
name="EBICS Files"
parent="ebics_processing_menu"
sequence="30"
/>
<menuitem
<menuitem
id="ebics_file_menu_download"
name="Download"
parent="ebics_file_menu"
@ -39,7 +39,7 @@
sequence="10"
/>
<menuitem
<menuitem
id="ebics_file_menu_upload"
name="Upload"
parent="ebics_file_menu"
@ -47,7 +47,7 @@
sequence="20"
/>
<menuitem
<menuitem
id="ebics_menu"
name="EBICS"
parent='account.menu_finance_configuration'
@ -55,7 +55,7 @@
sequence="100"
/>
<menuitem
<menuitem
id="ebics_config_menu"
name="EBICS Configuration"
parent="ebics_menu"
@ -64,7 +64,7 @@
sequence="10"
/>
<menuitem
<menuitem
id="ebics_file_format_menu"
name="EBICS File Formats"
parent="ebics_menu"
@ -73,7 +73,7 @@
sequence="20"
/>
<menuitem
<menuitem
id="ebics_admin_order_menu"
name="EBICS Administrative Orders"
parent="ebics_menu"

View File

@ -1,61 +1,61 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="ebics_admin_order_view_form" model="ir.ui.view">
<field name="name">EBICS Administrative Order</field>
<field name="model">ebics.admin.order</field>
<field name="inherit_id" ref="ebics_xfer_view_form_download" />
<field name="priority">1</field>
<field name="arch" type="xml">
<field name="date_from" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="date_to" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="format_id" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="order_type" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="order_type" position="after">
<field name="admin_order_type" />
</field>
<button name="ebics_download" position="attributes">
<attribute name="name">ebics_admin_order</attribute>
<attribute name="string">Execute</attribute>
</button>
</field>
</record>
<record id="ebics_admin_order_view_form" model="ir.ui.view">
<field name="name">EBICS Administrative Order</field>
<field name="model">ebics.admin.order</field>
<field name="inherit_id" ref="ebics_xfer_view_form_download" />
<field name="priority">1</field>
<field name="arch" type="xml">
<field name="date_from" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="date_to" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="format_id" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="order_type" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="order_type" position="after">
<field name="admin_order_type" />
</field>
<button name="ebics_download" position="attributes">
<attribute name="name">ebics_admin_order</attribute>
<attribute name="string">Execute</attribute>
</button>
</field>
</record>
<record id="ebics_admin_order_view_form_result" model="ir.ui.view">
<field name="name">EBICS Administrative Order result</field>
<field name="model">ebics.admin.order</field>
<field name="priority">2</field>
<field name="arch" type="xml">
<form string="EBICS Administrative Order result">
<separator colspan="4" string="Results :" />
<field name="note" colspan="4" nolabel="1" width="850" height="400" />
<footer>
<button
<record id="ebics_admin_order_view_form_result" model="ir.ui.view">
<field name="name">EBICS Administrative Order result</field>
<field name="model">ebics.admin.order</field>
<field name="priority">2</field>
<field name="arch" type="xml">
<form string="EBICS Administrative Order result">
<separator colspan="4" string="Results :" />
<field name="note" colspan="4" nolabel="1" width="850" height="400" />
<footer>
<button
string="Close"
class="btn-secondary"
special="cancel"
data-hotkey="z"
/>
</footer>
</form>
</field>
</record>
</footer>
</form>
</field>
</record>
<record id="ebics_admin_order_action" model="ir.actions.act_window">
<field name="name">EBICS Administrative Order</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ebics.admin.order</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="view_id" ref="ebics_admin_order_view_form" />
</record>
<record id="ebics_admin_order_action" model="ir.actions.act_window">
<field name="name">EBICS Administrative Order</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ebics.admin.order</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="view_id" ref="ebics_admin_order_view_form" />
</record>
</odoo>

View File

@ -1,4 +1,4 @@
# Copyright 2009-2024 Noviat.
# Copyright 2009-2025 Noviat.
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
import base64
@ -612,6 +612,7 @@ class EbicsXfer(models.TransientModel):
"date_from": self.date_from,
"date_to": self.date_to,
"format_id": file_format.id,
"state": file_format.download_process_method and "draft" or "done",
"user_id": self._uid,
"ebics_userid_id": self.ebics_userid_id.id,
"company_ids": self.ebics_config_id.company_ids.ids,

View File

@ -1,130 +1,133 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="ebics_xfer_view_form_download" model="ir.ui.view">
<field name="name">EBICS File Download</field>
<field name="model">ebics.xfer</field>
<field name="priority">1</field>
<field name="arch" type="xml">
<form string="EBICS File Download">
<group>
<separator string="Select your bank :" colspan="2" />
<field
<record id="ebics_xfer_view_form_download" model="ir.ui.view">
<field name="name">EBICS File Download</field>
<field name="model">ebics.xfer</field>
<field name="priority">1</field>
<field name="arch" type="xml">
<form string="EBICS File Download">
<group>
<separator string="Select your bank :" colspan="2" />
<field
name="ebics_config_id"
required="1"
options="{'no_create': True, 'no_open': True}"
/>
<field
<field
name="ebics_userid_id"
domain="[('ebics_config_id', '=', ebics_config_id), ('user_ids.id', '=', uid), ('transaction_rights', 'in', ['both', 'down'])]"
required="1"
options="{'no_create': True, 'no_open': True}"
/>
<field
<field
name="ebics_passphrase"
password="True"
invisible="ebics_passphrase_store"
required="not ebics_passphrase_store"
/>
<field name="date_from" />
<field name="date_to" />
<field
<field name="date_from" />
<field name="date_to" />
<field
name="format_id"
domain="[('type', '=', 'down'), ('id', 'in', allowed_format_ids)]"
/>
<field name="order_type" />
</group>
<footer>
<button
<field name="order_type" />
</group>
<footer>
<button
name="ebics_download"
string="Download Files"
type="object"
class="btn-primary"
data-hotkey="q"
/>
<button
<button
string="Cancel"
class="btn-secondary"
special="cancel"
data-hotkey="z"
/>
</footer>
</form>
</field>
</record>
</footer>
</form>
</field>
</record>
<record id="ebics_xfer_view_form_upload" model="ir.ui.view">
<field name="name">EBICS File Upload</field>
<field name="model">ebics.xfer</field>
<field name="priority">1</field>
<field name="arch" type="xml">
<form string="EBICS File Upload">
<group>
<separator string="Select your bank :" colspan="2" />
<field
<record id="ebics_xfer_view_form_upload" model="ir.ui.view">
<field name="name">EBICS File Upload</field>
<field name="model">ebics.xfer</field>
<field name="priority">1</field>
<field name="arch" type="xml">
<form string="EBICS File Upload">
<group>
<separator string="Select your bank :" colspan="2" />
<field
name="ebics_config_id"
required="1"
options="{'no_create': True, 'no_open': True}"
/>
<field
<field
name="ebics_userid_id"
domain="[('ebics_config_id', '=', ebics_config_id), ('user_ids.id', '=', uid), ('transaction_rights', 'in', ['both', 'up'])]"
required="1"
options="{'no_create': True, 'no_open': True}"
/>
<field
<field
name="ebics_passphrase"
password="True"
invisible="ebics_passphrase_store"
required="not ebics_passphrase_store"
/>
<field
<field
name="ebics_sig_passphrase"
password="True"
invisible="ebics_sig_passphrase_invisible"
/>
<separator string="Select your file :" colspan="2" />
<field name="upload_data" filename="upload_fname" required="1" />
<field name="upload_fname" invisible="1" />
<field name="upload_fname_dummy" string="Upload Filename" />
<field
<separator string="Select your file :" colspan="2" />
<field name="upload_data" filename="upload_fname" required="1" />
<field name="upload_fname" invisible="1" />
<field name="upload_fname_dummy" string="Upload Filename" />
<field
name="format_id"
required="1"
domain="[('type', '=', 'up'), ('id', 'in', allowed_format_ids)]"
readonly="context.get('active_model') == 'account.payment.order'"
/>
<field name="order_type" />
<field name="test_mode" invisible="order_type not in ('FUL', 'BTU')" />
</group>
<footer>
<button
<field name="order_type" />
<field
name="test_mode"
invisible="order_type not in ('FUL', 'BTU')"
/>
</group>
<footer>
<button
name="ebics_upload"
string="Upload File"
type="object"
class="btn-primary"
data-hotkey="q"
/>
<button
<button
string="Cancel"
class="btn-secondary"
special="cancel"
data-hotkey="z"
/>
</footer>
</form>
</field>
</record>
</footer>
</form>
</field>
</record>
<record id="ebics_xfer_view_form_result" model="ir.ui.view">
<field name="name">EBICS File Transfer</field>
<field name="model">ebics.xfer</field>
<field name="priority">2</field>
<field name="arch" type="xml">
<form string="EBICS File Transfer">
<separator colspan="4" string="Results :" />
<field name="note" colspan="4" nolabel="1" width="850" height="400" />
<footer>
<button
<record id="ebics_xfer_view_form_result" model="ir.ui.view">
<field name="name">EBICS File Transfer</field>
<field name="model">ebics.xfer</field>
<field name="priority">2</field>
<field name="arch" type="xml">
<form string="EBICS File Transfer">
<separator colspan="4" string="Results :" />
<field name="note" colspan="4" nolabel="1" width="850" height="400" />
<footer>
<button
name="view_ebics_file"
type="object"
string="View EBICS File(s)"
@ -132,35 +135,35 @@
invisible="not context.get('ebics_file_ids')"
data-hotkey="q"
/>
<button
<button
string="Close"
class="btn-secondary"
special="cancel"
data-hotkey="z"
/>
</footer>
</form>
</field>
</record>
</footer>
</form>
</field>
</record>
<record id="ebics_xfer_action_download" model="ir.actions.act_window">
<field name="name">EBICS File Transfer - Download</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ebics.xfer</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="context">{'ebics_download': 1}</field>
<field name="view_id" ref="ebics_xfer_view_form_download" />
</record>
<record id="ebics_xfer_action_download" model="ir.actions.act_window">
<field name="name">EBICS File Transfer - Download</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ebics.xfer</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="context">{'ebics_download': 1}</field>
<field name="view_id" ref="ebics_xfer_view_form_download" />
</record>
<record id="ebics_xfer_action_upload" model="ir.actions.act_window">
<field name="name">EBICS File Transfer - Upload</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ebics.xfer</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="context">{'ebics_upload': 1}</field>
<field name="view_id" ref="ebics_xfer_view_form_upload" />
</record>
<record id="ebics_xfer_action_upload" model="ir.actions.act_window">
<field name="name">EBICS File Transfer - Upload</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ebics.xfer</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="context">{'ebics_upload': 1}</field>
<field name="view_id" ref="ebics_xfer_view_form_upload" />
</record>
</odoo>

View File

@ -1,4 +1,4 @@
# Copyright 2009-2024 Noviat.
# Copyright 2009-2025 Noviat.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{

View File

@ -182,7 +182,9 @@ class EbicsBatchLog(models.Model):
return file_ids
def _ebics_process(self, import_dict):
to_process = self.file_ids.filtered(lambda r: r.state == "draft")
to_process = self.file_ids.filtered(
lambda r: r.download_process_method and r.state == "draft"
)
for ebics_file in to_process:
ebics_file.process()