[14.0]black, isort, prettier

This commit is contained in:
Luc De Meyer
2022-05-10 21:40:54 +02:00
parent ebaa6fd83a
commit 8f19f4ca4b
21 changed files with 1331 additions and 983 deletions

View File

@@ -6,10 +6,10 @@
<field name="model">ebics.config</field>
<field name="arch" type="xml">
<tree string="EBICS Configuration" decoration-muted="state == 'draft'">
<field name="name"/>
<field name="ebics_host"/>
<field name="state"/>
<field name="active"/>
<field name="name" />
<field name="ebics_host" />
<field name="state" />
<field name="active" />
</tree>
</field>
</record>
@@ -20,44 +20,63 @@
<field name="arch" type="xml">
<form string="EBICS Configuration">
<header>
<button name="set_to_draft" states="confirm" string="Set to Draft" type="object"
groups="account_ebics.group_ebics_manager"
help="Set to Draft in order to change the EBICS configuration parameters."/>
<button name="set_to_confirm" states="draft" string="Confirm" type="object" class="oe_highlight"
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"/>
<button
name="set_to_draft"
states="confirm"
string="Set to Draft"
type="object"
groups="account_ebics.group_ebics_manager"
help="Set to Draft in order to change the EBICS configuration parameters."
/>
<button
name="set_to_confirm"
states="draft"
string="Confirm"
type="object"
class="oe_highlight"
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>
<field name="active" invisible="1" />
<widget name="web_ribbon"
text="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"/>
<widget
name="web_ribbon"
text="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
/>
<group name="main">
<group name="main-left">
<field name="name" colspan="2"/>
<field name="ebics_host"/>
<field name="ebics_url"/>
<field name="ebics_partner"/>
<field name="ebics_files"/>
<field name="ebics_keys"/>
<field name="name" colspan="2" />
<field name="ebics_host" />
<field name="ebics_url" />
<field name="ebics_partner" />
<field name="ebics_files" />
<field name="ebics_keys" />
</group>
<group name="main-right">
<field name="journal_ids" widget="many2many_tags" options="{'no_create': True}"/>
<field name="ebics_version"/>
<field name="ebics_key_version"/>
<field name="ebics_key_bitlength"/>
<field name="order_number"
attrs="{'invisible': [('ebics_version', '=', 'H004')]}"/>
<field
name="journal_ids"
widget="many2many_tags"
options="{'no_create': True}"
/>
<field name="ebics_version" />
<field name="ebics_key_version" />
<field name="ebics_key_bitlength" />
<field
name="order_number"
attrs="{'invisible': [('ebics_version', '=', 'H004')]}"
/>
</group>
<field name="company_ids" invisible="1"/>
<field name="company_ids" invisible="1" />
</group>
<notebook>
<page string="EBICS Users" groups="account_ebics.group_ebics_manager">
<field name="ebics_userid_ids"/>
<field name="ebics_userid_ids" />
</page>
<page string="File Formats" groups="account_ebics.group_ebics_manager">
<field name="ebics_file_format_ids"/>
<field name="ebics_file_format_ids" />
</page>
</notebook>
</form>

View File

@@ -6,11 +6,11 @@
<field name="model">ebics.file.format</field>
<field name="arch" type="xml">
<tree string="EBICS File Formats">
<field name="type"/>
<field name="order_type"/>
<field name="signature_class"/>
<field name="name"/>
<field name="description"/>
<field name="type" />
<field name="order_type" />
<field name="signature_class" />
<field name="name" />
<field name="description" />
</tree>
</field>
</record>
@@ -22,20 +22,22 @@
<form string="EBICS File Format">
<group name="main">
<group name="main-left">
<field name="type"/>
<field name="suffix"/>
<field name="download_process_method"
attrs="{'invisible': [('type', '=', 'up')]}"
force_save="1"/>
<field name="signature_class"/>
<field name="type" />
<field name="suffix" />
<field
name="download_process_method"
attrs="{'invisible': [('type', '=', 'up')]}"
force_save="1"
/>
<field name="signature_class" />
</group>
<group name="main-right">
<field name="order_type"/>
<field name="name"/>
<field name="order_type" />
<field name="name" />
</group>
</group>
<group name="description">
<field name="description"/>
<field name="description" />
</group>
</form>
</field>

View File

@@ -7,18 +7,26 @@
<field name="arch" type="xml">
<search string="Search EBICS Files">
<group col="10" colspan="4">
<field name="date_from"/>
<field name="date_to"/>
<field name="name"/>
<field name="format_id"/>
<field name="user_id"/>
<field name="company_ids" widget="selection" groups="base.group_multi_company"/>
<field name="date_from" />
<field name="date_to" />
<field name="name" />
<field name="format_id" />
<field name="user_id" />
<field
name="company_ids"
widget="selection"
groups="base.group_multi_company"
/>
</group>
<newline/>
<newline />
<group expand="0" string="Group By">
<filter string="File Format" name="file_format" context="{'group_by':'format_id'}"/>
<filter string="State" name="state" context="{'group_by':'state'}"/>
<filter string="User" name="user" context="{'group_by':'user_id'}"/>
<filter
string="File Format"
name="file_format"
context="{'group_by':'format_id'}"
/>
<filter string="State" name="state" context="{'group_by':'state'}" />
<filter string="User" name="user" context="{'group_by':'user_id'}" />
</group>
</search>
</field>
@@ -31,14 +39,18 @@
<field name="model">ebics.file</field>
<field name="arch" type="xml">
<tree string="EBICS Files" decoration-muted="state=='draft'" create="false">
<field name="date" string="Download Date"/>
<field name="name"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="user_id"/>
<field name="state"/>
<field name="format_id"/>
<field name="company_ids" widget="many2many_tags" groups="base.group_multi_company"/>
<field name="date" string="Download Date" />
<field name="name" />
<field name="date_from" />
<field name="date_to" />
<field name="user_id" />
<field name="state" />
<field name="format_id" />
<field
name="company_ids"
widget="many2many_tags"
groups="base.group_multi_company"
/>
</tree>
</field>
</record>
@@ -50,34 +62,55 @@
<field name="arch" type="xml">
<form string="EBICS File" create="false">
<header>
<button name="set_to_draft" states="done" string="Set to Draft" type="object" groups="account.group_account_manager"/>
<button name="process"
class="oe_highlight"
states="draft"
string="Process"
type="object"
groups="account.group_account_invoice"
help="Process the EBICS File"/>
<button name="set_to_done" states="draft" string="Set to Done" type="object" groups="account.group_account_manager"/>
<field name="state" widget="statusbar"/>
<button
name="set_to_draft"
states="done"
string="Set to Draft"
type="object"
groups="account.group_account_manager"
/>
<button
name="process"
class="oe_highlight"
states="draft"
string="Process"
type="object"
groups="account.group_account_invoice"
help="Process the EBICS File"
/>
<button
name="set_to_done"
states="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"/>
<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"
/>
</group>
<notebook>
<page string="Additional Information">
<field name="note" nolabel="1"/>
<field name="note" nolabel="1" />
</page>
<page string="Bank Statements" attrs="{'invisible':[('bank_statement_ids','=',[])]}">
<field name="bank_statement_ids" nolabel="1"/>
<page
string="Bank Statements"
attrs="{'invisible':[('bank_statement_ids','=',[])]}"
>
<field name="bank_statement_ids" nolabel="1" />
</page>
</notebook>
</form>
@@ -91,12 +124,16 @@
<field name="arch" type="xml">
<form string="Process EBICS File">
<separator colspan="4" string="Results :" />
<field name="note_process" colspan="4" nolabel="1" width="850" height="400"/>
<field name="note_process" colspan="4" nolabel="1" width="850" height="400" />
<footer>
<button name="action_open_bank_statements" string="View Bank Statement(s)"
type="object" class="oe_highlight"
invisible="not context.get('statement_ids')"/>
<button name="button_close" type="object" string="Close"/>
<button
name="action_open_bank_statements"
string="View Bank Statement(s)"
type="object"
class="oe_highlight"
invisible="not context.get('statement_ids')"
/>
<button name="button_close" type="object" string="Close" />
</footer>
</form>
</field>
@@ -107,23 +144,23 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">ebics.file</field>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="False"/>
<field name="view_id" eval="False" />
<field name="domain">[('type','=','down')]</field>
<field name="search_view_id" ref="ebics_file_view_search"/>
<field name="search_view_id" ref="ebics_file_view_search" />
</record>
<record id="ebics_file_action_download_tree" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field eval="1" name="sequence" />
<field name="view_mode">tree</field>
<field name="view_id" ref="ebics_file_view_tree_download"/>
<field name="act_window_id" ref="ebics_file_action_download"/>
<field name="view_id" ref="ebics_file_view_tree_download" />
<field name="act_window_id" ref="ebics_file_action_download" />
</record>
<record id="ebics_file_action_download_form" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field eval="2" name="sequence" />
<field name="view_mode">form</field>
<field name="view_id" ref="ebics_file_view_form_download"/>
<field name="act_window_id" ref="ebics_file_action_download"/>
<field name="view_id" ref="ebics_file_view_form_download" />
<field name="act_window_id" ref="ebics_file_action_download" />
</record>
<!-- Upload -->
@@ -133,12 +170,16 @@
<field name="model">ebics.file</field>
<field name="arch" type="xml">
<tree string="EBICS Files" decoration-muted="state=='draft'" create="false">
<field name="date" string="Upload Date"/>
<field name="name"/>
<field name="user_id"/>
<field name="state"/>
<field name="format_id"/>
<field name="company_ids" widget="many2many_tags" groups="base.group_multi_company"/>
<field name="date" string="Upload Date" />
<field name="name" />
<field name="user_id" />
<field name="state" />
<field name="format_id" />
<field
name="company_ids"
widget="many2many_tags"
groups="base.group_multi_company"
/>
</tree>
</field>
</record>
@@ -150,22 +191,38 @@
<field name="arch" type="xml">
<form string="EBICS File" create="false">
<header>
<button name="set_to_draft" states="done" string="Set to Draft" type="object" groups="account.group_account_manager"/>
<button name="set_to_done" states="draft" string="Set to Done" type="object" groups="account.group_account_manager"/>
<field name="state" widget="statusbar"/>
<button
name="set_to_draft"
states="done"
string="Set to Draft"
type="object"
groups="account.group_account_manager"
/>
<button
name="set_to_done"
states="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="Upload Date"/>
<field name="name"/>
<field name="data" filename="name"/>
<field name="format_id"/>
<field name="user_id"/>
<field name="ebics_userid_id"/>
<field name="company_ids" widget="many2many_tags" groups="base.group_multi_company"/>
<field name="date" string="Upload Date" />
<field name="name" />
<field name="data" filename="name" />
<field name="format_id" />
<field name="user_id" />
<field name="ebics_userid_id" />
<field
name="company_ids"
widget="many2many_tags"
groups="base.group_multi_company"
/>
</group>
<notebook>
<page string="Additional Information">
<field name="note" nolabel="1"/>
<field name="note" nolabel="1" />
</page>
</notebook>
</form>
@@ -177,23 +234,23 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">ebics.file</field>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="False"/>
<field name="view_id" eval="False" />
<field name="domain">[('type','=','up')]</field>
<field name="search_view_id" ref="ebics_file_view_search"/>
<field name="search_view_id" ref="ebics_file_view_search" />
</record>
<record id="ebics_file_action_upload_tree" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field eval="1" name="sequence" />
<field name="view_mode">tree</field>
<field name="view_id" ref="ebics_file_view_tree_upload"/>
<field name="act_window_id" ref="ebics_file_action_upload"/>
<field name="view_id" ref="ebics_file_view_tree_upload" />
<field name="act_window_id" ref="ebics_file_action_upload" />
</record>
<record id="ebics_file_action_upload_form" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field eval="2" name="sequence" />
<field name="view_mode">form</field>
<field name="view_id" ref="ebics_file_view_form_upload"/>
<field name="act_window_id" ref="ebics_file_action_upload"/>
<field name="view_id" ref="ebics_file_view_form_upload" />
<field name="act_window_id" ref="ebics_file_action_upload" />
</record>
</odoo>

View File

@@ -6,10 +6,10 @@
<field name="model">ebics.userid</field>
<field name="arch" type="xml">
<tree string="EBICS UserID" decoration-muted="state != 'active_keys'">
<field name="name"/>
<field name="signature_class"/>
<field name="state"/>
<field name="active"/>
<field name="name" />
<field name="signature_class" />
<field name="state" />
<field name="active" />
</tree>
</field>
</record>
@@ -20,67 +20,136 @@
<field name="arch" type="xml">
<form string="EBICS UserID">
<header groups="account_ebics.group_ebics_manager">
<button name="ebics_init_1" states="draft" string="EBICS Initialisation" type="object" class="oe_highlight"
help="Initialise EBICS Bank Keys"/>
<button name="ebics_init_2" states="init" string="Account activated" type="object" class="oe_highlight"
help="EBICS Initialisation - Push this button when the account has been activated by the bank."/>
<button name="ebics_init_3" states="get_bank_keys" string="Get Bank Keys" type="object" class="oe_highlight"
help="EBICS Initialisation - After the account has been activated the public bank keys must be downloaded and checked for consistency."/>
<button name="ebics_init_4" states="to_verify" string="Bank Keys Verified" type="object" class="oe_highlight"
help="EBICS Initialisation - Push this button when the public have been checked for consistency."/>
<button name="change_passphrase" string="Change Passphrase" type="object" class="oe_highlight"
attrs="{'invisible': [('ebics_keys_found', '=', False)]}"/>
<button name="set_to_draft" states="active_keys" string="Set to Draft" type="object"
help="Set to Draft in order to reinitialize your bank connection."/>
<button name="set_to_get_bank_keys" states="active_keys" string="Renew Bank Keys" type="object"
help="Use this button to update the EBICS certificates of your bank."/>
<button name="set_to_active_keys" states="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"/>
<button
name="ebics_init_1"
states="draft"
string="EBICS Initialisation"
type="object"
class="oe_highlight"
help="Initialise EBICS Bank Keys"
/>
<button
name="ebics_init_2"
states="init"
string="Account activated"
type="object"
class="oe_highlight"
help="EBICS Initialisation - Push this button when the account has been activated by the bank."
/>
<button
name="ebics_init_3"
states="get_bank_keys"
string="Get Bank Keys"
type="object"
class="oe_highlight"
help="EBICS Initialisation - After the account has been activated the public bank keys must be downloaded and checked for consistency."
/>
<button
name="ebics_init_4"
states="to_verify"
string="Bank Keys Verified"
type="object"
class="oe_highlight"
help="EBICS Initialisation - Push this button when the public have been checked for consistency."
/>
<button
name="change_passphrase"
string="Change Passphrase"
type="object"
class="oe_highlight"
attrs="{'invisible': [('ebics_keys_found', '=', False)]}"
/>
<button
name="set_to_draft"
states="active_keys"
string="Set to Draft"
type="object"
help="Set to Draft in order to reinitialize your bank connection."
/>
<button
name="set_to_get_bank_keys"
states="active_keys"
string="Renew Bank Keys"
type="object"
help="Use this button to update the EBICS certificates of your bank."
/>
<button
name="set_to_active_keys"
states="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" attrs="{'readonly': [('state', '!=', 'draft')]}">
<field name="ebics_keys_found" invisible="1"/>
<field name="ebics_keys_fn" invisible="1"/>
<field name="ebics_keys_found" invisible="1" />
<field name="ebics_keys_fn" invisible="1" />
<group name="main-left">
<field name="name"/>
<field name="ebics_passphrase" password="True"
attrs="{'required': [('state', '=', 'draft')]}"/>
<field name="swift_3skey"
attrs="{'invisible': [('signature_class', '=', 'T')]}"/>
<field name="swift_3skey_certificate_fn" invisible="1"/>
<field name="swift_3skey_certificate" filename="swift_3skey_certificate_fn"
attrs="{'invisible': [('swift_3skey', '=', False)], 'required': [('swift_3skey', '=', True)]}"/>
<field name="active"/>
<field name="name" />
<field
name="ebics_passphrase"
password="True"
attrs="{'required': [('state', '=', 'draft')]}"
/>
<field
name="swift_3skey"
attrs="{'invisible': [('signature_class', '=', 'T')]}"
/>
<field name="swift_3skey_certificate_fn" invisible="1" />
<field
name="swift_3skey_certificate"
filename="swift_3skey_certificate_fn"
attrs="{'invisible': [('swift_3skey', '=', False)], 'required': [('swift_3skey', '=', True)]}"
/>
<field name="active" />
</group>
<group name="main-right">
<field name="signature_class"/>
<field name="user_ids" widget="many2many_tags" options="{'no_create': True}"/>
<field name="ebics_key_x509"/>
<field name="signature_class" />
<field
name="user_ids"
widget="many2many_tags"
options="{'no_create': True}"
/>
<field name="ebics_key_x509" />
</group>
</group>
<group col="4" name="dn" attrs="{'invisible': [('ebics_key_x509', '=', False)], 'readonly': [('state', '!=', 'draft')]}">
<group
col="4"
name="dn"
attrs="{'invisible': [('ebics_key_x509', '=', False)], 'readonly': [('state', '!=', 'draft')]}"
>
<group colspan="4" col="1">
<strong>Distinguished Name attributes used to create self-signed X.509 certificates:</strong>
<strong
>Distinguished Name attributes used to create self-signed X.509 certificates:</strong>
</group>
<group name="dn_l" colspan="2">
<field name="ebics_key_x509_dn_cn"/>
<field name="ebics_key_x509_dn_o"/>
<field name="ebics_key_x509_dn_l"/>
<field name="ebics_key_x509_dn_c"/>
<field name="ebics_key_x509_dn_cn" />
<field name="ebics_key_x509_dn_o" />
<field name="ebics_key_x509_dn_l" />
<field name="ebics_key_x509_dn_c" />
</group>
<group name="dn_r" colspan="2">
<field name="ebics_key_x509_dn_e"/>
<field name="ebics_key_x509_dn_ou"/>
<field name="ebics_key_x509_dn_st"/>
<field name="ebics_key_x509_dn_e" />
<field name="ebics_key_x509_dn_ou" />
<field name="ebics_key_x509_dn_st" />
</group>
</group>
<group colspan="4" name="ebics_ini_letter" attrs="{'invisible': [('ebics_ini_letter', '=', False)]}">
<field name="ebics_ini_letter_fn" invisible="1"/>
<field name="ebics_ini_letter" filename="ebics_ini_letter_fn"/>
<group
colspan="4"
name="ebics_ini_letter"
attrs="{'invisible': [('ebics_ini_letter', '=', False)]}"
>
<field name="ebics_ini_letter_fn" invisible="1" />
<field name="ebics_ini_letter" filename="ebics_ini_letter_fn" />
</group>
<group colspan="4" name="ebics_public_bank_keys" attrs="{'invisible': [('ebics_public_bank_keys', '=', False)]}">
<field name="ebics_public_bank_keys_fn" invisible="1"/>
<field name="ebics_public_bank_keys" filename="ebics_public_bank_keys_fn"/>
<group
colspan="4"
name="ebics_public_bank_keys"
attrs="{'invisible': [('ebics_public_bank_keys', '=', False)]}"
>
<field name="ebics_public_bank_keys_fn" invisible="1" />
<field name="ebics_public_bank_keys" filename="ebics_public_bank_keys_fn" />
</group>
</form>
</field>

View File

@@ -1,58 +1,76 @@
<?xml version="1.0" ?>
<odoo>
<menuitem id="ebics_processing_menu"
name="EBICS Processing"
parent="account.menu_finance"
sequence="4"/>
<menuitem
id="ebics_processing_menu"
name="EBICS Processing"
parent="account.menu_finance"
sequence="4"
/>
<menuitem id="ebics_xfer_menu_download"
name="EBICS Download"
parent="ebics_processing_menu"
action="ebics_xfer_action_download"
sequence="10"/>
<menuitem
id="ebics_xfer_menu_download"
name="EBICS Download"
parent="ebics_processing_menu"
action="ebics_xfer_action_download"
sequence="10"
/>
<menuitem id="ebics_xfer_menu_upload"
name="EBICS Upload"
parent="ebics_processing_menu"
action="ebics_xfer_action_upload"
sequence="20"/>
<menuitem
id="ebics_xfer_menu_upload"
name="EBICS Upload"
parent="ebics_processing_menu"
action="ebics_xfer_action_upload"
sequence="20"
/>
<menuitem id="ebics_file_menu"
name="EBICS Files"
parent="ebics_processing_menu"
sequence="30"/>
<menuitem
id="ebics_file_menu"
name="EBICS Files"
parent="ebics_processing_menu"
sequence="30"
/>
<menuitem id="ebics_file_menu_download"
name="Download"
parent="ebics_file_menu"
action="ebics_file_action_download"
sequence="10"/>
<menuitem
id="ebics_file_menu_download"
name="Download"
parent="ebics_file_menu"
action="ebics_file_action_download"
sequence="10"
/>
<menuitem id="ebics_file_menu_upload"
name="Upload"
parent="ebics_file_menu"
action="ebics_file_action_upload"
sequence="20"/>
<menuitem
id="ebics_file_menu_upload"
name="Upload"
parent="ebics_file_menu"
action="ebics_file_action_upload"
sequence="20"
/>
<menuitem id="ebics_menu"
name="EBICS"
parent='account.menu_finance_configuration'
groups="account_ebics.group_ebics_manager"
sequence="100"/>
<menuitem
id="ebics_menu"
name="EBICS"
parent='account.menu_finance_configuration'
groups="account_ebics.group_ebics_manager"
sequence="100"
/>
<menuitem id="ebics_config_menu"
name="EBICS Configuration"
parent="ebics_menu"
action="ebics_config_action"
groups="account_ebics.group_ebics_manager"
sequence="10"/>
<menuitem
id="ebics_config_menu"
name="EBICS Configuration"
parent="ebics_menu"
action="ebics_config_action"
groups="account_ebics.group_ebics_manager"
sequence="10"
/>
<menuitem id="ebics_file_format_menu"
name="EBICS File Formats"
parent="ebics_menu"
action="ebics_file_format_action"
groups="account_ebics.group_ebics_manager"
sequence="20"/>
<menuitem
id="ebics_file_format_menu"
name="EBICS File Formats"
parent="ebics_menu"
action="ebics_file_format_action"
groups="account_ebics.group_ebics_manager"
sequence="20"
/>
</odoo>