mirror of
https://github.com/brain-tec/account_ebics.git
synced 2024-11-27 14:37:25 +00:00
[MIG] account_ebics: Migration to 17.0
This commit is contained in:
parent
08482045d8
commit
cb5ac3ac23
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "EBICS banking protocol",
|
"name": "EBICS banking protocol",
|
||||||
"version": "16.0.1.9.0",
|
"version": "17.0.1.0.0",
|
||||||
"license": "LGPL-3",
|
"license": "LGPL-3",
|
||||||
"author": "Noviat",
|
"author": "Noviat",
|
||||||
"website": "https://www.noviat.com",
|
"website": "https://www.noviat.com",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright 2009-2023 Noviat.
|
# Copyright 2009-2024 Noviat.
|
||||||
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
|
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
@ -22,23 +22,17 @@ class EbicsConfig(models.Model):
|
|||||||
_order = "name"
|
_order = "name"
|
||||||
|
|
||||||
name = fields.Char(
|
name = fields.Char(
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
required=True,
|
required=True,
|
||||||
)
|
)
|
||||||
journal_ids = fields.Many2many(
|
journal_ids = fields.Many2many(
|
||||||
comodel_name="account.journal",
|
comodel_name="account.journal",
|
||||||
relation="account_journal_ebics_config_rel",
|
relation="account_journal_ebics_config_rel",
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
string="Bank Accounts",
|
string="Bank Accounts",
|
||||||
domain="[('type', '=', 'bank')]",
|
domain="[('type', '=', 'bank')]",
|
||||||
)
|
)
|
||||||
ebics_host = fields.Char(
|
ebics_host = fields.Char(
|
||||||
string="EBICS HostID",
|
string="EBICS HostID",
|
||||||
required=True,
|
required=True,
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
help="Contact your bank to get the EBICS HostID."
|
help="Contact your bank to get the EBICS HostID."
|
||||||
"\nIn France the BIC is usually allocated to the HostID "
|
"\nIn France the BIC is usually allocated to the HostID "
|
||||||
"whereas in Germany it tends to be an institute specific string "
|
"whereas in Germany it tends to be an institute specific string "
|
||||||
@ -47,8 +41,6 @@ class EbicsConfig(models.Model):
|
|||||||
ebics_url = fields.Char(
|
ebics_url = fields.Char(
|
||||||
string="EBICS URL",
|
string="EBICS URL",
|
||||||
required=True,
|
required=True,
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
help="Contact your bank to get the EBICS URL.",
|
help="Contact your bank to get the EBICS URL.",
|
||||||
)
|
)
|
||||||
ebics_version = fields.Selection(
|
ebics_version = fields.Selection(
|
||||||
@ -58,16 +50,12 @@ class EbicsConfig(models.Model):
|
|||||||
("H005", "H005 (3.0)"),
|
("H005", "H005 (3.0)"),
|
||||||
],
|
],
|
||||||
string="EBICS protocol version",
|
string="EBICS protocol version",
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
required=True,
|
required=True,
|
||||||
default="H004",
|
default="H004",
|
||||||
)
|
)
|
||||||
ebics_partner = fields.Char(
|
ebics_partner = fields.Char(
|
||||||
string="EBICS PartnerID",
|
string="EBICS PartnerID",
|
||||||
required=True,
|
required=True,
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
help="Organizational unit (company or individual) "
|
help="Organizational unit (company or individual) "
|
||||||
"that concludes a contract with the bank. "
|
"that concludes a contract with the bank. "
|
||||||
"\nIn this contract it will be agreed which order types "
|
"\nIn this contract it will be agreed which order types "
|
||||||
@ -81,8 +69,6 @@ class EbicsConfig(models.Model):
|
|||||||
comodel_name="ebics.userid",
|
comodel_name="ebics.userid",
|
||||||
inverse_name="ebics_config_id",
|
inverse_name="ebics_config_id",
|
||||||
string="EBICS UserID",
|
string="EBICS UserID",
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
help="Human users or a technical system that is/are "
|
help="Human users or a technical system that is/are "
|
||||||
"assigned to a customer. "
|
"assigned to a customer. "
|
||||||
"\nOn the EBICS bank server it is identified "
|
"\nOn the EBICS bank server it is identified "
|
||||||
@ -96,8 +82,6 @@ class EbicsConfig(models.Model):
|
|||||||
ebics_keys = fields.Char(
|
ebics_keys = fields.Char(
|
||||||
string="EBICS Keys Root",
|
string="EBICS Keys Root",
|
||||||
required=True,
|
required=True,
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
default=lambda self: self._default_ebics_keys(),
|
default=lambda self: self._default_ebics_keys(),
|
||||||
help="Root Directory for storing the EBICS Keys.",
|
help="Root Directory for storing the EBICS Keys.",
|
||||||
)
|
)
|
||||||
@ -105,15 +89,11 @@ class EbicsConfig(models.Model):
|
|||||||
selection=[("A005", "A005 (RSASSA-PKCS1-v1_5)"), ("A006", "A006 (RSASSA-PSS)")],
|
selection=[("A005", "A005 (RSASSA-PKCS1-v1_5)"), ("A006", "A006 (RSASSA-PSS)")],
|
||||||
string="EBICS key version",
|
string="EBICS key version",
|
||||||
default="A006",
|
default="A006",
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
help="The key version of the electronic signature.",
|
help="The key version of the electronic signature.",
|
||||||
)
|
)
|
||||||
ebics_key_bitlength = fields.Integer(
|
ebics_key_bitlength = fields.Integer(
|
||||||
string="EBICS key bitlength",
|
string="EBICS key bitlength",
|
||||||
default=2048,
|
default=2048,
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
help="The bit length of the generated keys. "
|
help="The bit length of the generated keys. "
|
||||||
"\nThe value must be between 1536 and 4096.",
|
"\nThe value must be between 1536 and 4096.",
|
||||||
)
|
)
|
||||||
@ -122,19 +102,15 @@ class EbicsConfig(models.Model):
|
|||||||
column1="config_id",
|
column1="config_id",
|
||||||
column2="format_id",
|
column2="format_id",
|
||||||
string="EBICS File Format",
|
string="EBICS File Format",
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
)
|
)
|
||||||
state = fields.Selection(
|
state = fields.Selection(
|
||||||
[("draft", "Draft"), ("confirm", "Confirmed")],
|
selection=[("draft", "Draft"), ("confirm", "Confirmed")],
|
||||||
default="draft",
|
default="draft",
|
||||||
required=True,
|
required=True,
|
||||||
readonly=True,
|
readonly=True,
|
||||||
)
|
)
|
||||||
order_number = fields.Char(
|
order_number = fields.Char(
|
||||||
size=4,
|
size=4,
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
help="Specify the number for the next order."
|
help="Specify the number for the next order."
|
||||||
"\nThis number should match the following pattern : "
|
"\nThis number should match the following pattern : "
|
||||||
"[A-Z]{1}[A-Z0-9]{3}",
|
"[A-Z]{1}[A-Z0-9]{3}",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright 2009-2023 Noviat.
|
# Copyright 2009-2024 Noviat.
|
||||||
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
|
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
|
||||||
|
|
||||||
from odoo import api, fields, models
|
from odoo import api, fields, models
|
||||||
@ -110,11 +110,10 @@ class EbicsFileFormat(models.Model):
|
|||||||
if self.type == "up":
|
if self.type == "up":
|
||||||
self.download_process_method = False
|
self.download_process_method = False
|
||||||
|
|
||||||
def name_get(self):
|
@api.depends("ebics_version", "name", "btf_message", "description")
|
||||||
res = []
|
def _compute_display_name(self):
|
||||||
for rec in self:
|
for rec in self:
|
||||||
name = rec.ebics_version == "2" and rec.name or rec.btf_message
|
name = rec.ebics_version == "2" and rec.name or rec.btf_message
|
||||||
if rec.description:
|
if rec.description:
|
||||||
name += " - " + rec.description
|
name += " - " + rec.description
|
||||||
res.append((rec.id, name))
|
rec.display_name = name
|
||||||
return res
|
|
||||||
|
@ -47,8 +47,6 @@ class EbicsUserID(models.Model):
|
|||||||
name = fields.Char(
|
name = fields.Char(
|
||||||
string="EBICS UserID",
|
string="EBICS UserID",
|
||||||
required=True,
|
required=True,
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
help="Human users or a technical system that is/are "
|
help="Human users or a technical system that is/are "
|
||||||
"assigned to a customer. "
|
"assigned to a customer. "
|
||||||
"\nOn the EBICS bank server it is identified "
|
"\nOn the EBICS bank server it is identified "
|
||||||
@ -71,14 +69,10 @@ class EbicsUserID(models.Model):
|
|||||||
help="Users who are allowed to use this EBICS UserID for "
|
help="Users who are allowed to use this EBICS UserID for "
|
||||||
" bank transactions.",
|
" bank transactions.",
|
||||||
)
|
)
|
||||||
# Currently only a single signature class per user is supported
|
|
||||||
# Classes A and B are not yet supported.
|
|
||||||
signature_class = fields.Selection(
|
signature_class = fields.Selection(
|
||||||
selection=[("E", "Single signature"), ("T", "Transport signature")],
|
selection=[("E", "Single signature"), ("T", "Transport signature")],
|
||||||
required=True,
|
required=True,
|
||||||
default="T",
|
default="T",
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
help="Default signature class."
|
help="Default signature class."
|
||||||
"This default can be overriden for specific "
|
"This default can be overriden for specific "
|
||||||
"EBICS transactions (cf. File Formats).",
|
"EBICS transactions (cf. File Formats).",
|
||||||
@ -152,44 +146,28 @@ class EbicsUserID(models.Model):
|
|||||||
# create self-signed X.509 certificates
|
# create self-signed X.509 certificates
|
||||||
ebics_key_x509 = fields.Boolean(
|
ebics_key_x509 = fields.Boolean(
|
||||||
string="X509 support",
|
string="X509 support",
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
help="Set this flag in order to work with " "self-signed X.509 certificates",
|
help="Set this flag in order to work with " "self-signed X.509 certificates",
|
||||||
)
|
)
|
||||||
ebics_key_x509_dn_cn = fields.Char(
|
ebics_key_x509_dn_cn = fields.Char(
|
||||||
string="Common Name [CN]",
|
string="Common Name [CN]",
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
)
|
)
|
||||||
ebics_key_x509_dn_o = fields.Char(
|
ebics_key_x509_dn_o = fields.Char(
|
||||||
string="Organization Name [O]",
|
string="Organization Name [O]",
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
)
|
)
|
||||||
ebics_key_x509_dn_ou = fields.Char(
|
ebics_key_x509_dn_ou = fields.Char(
|
||||||
string="Organizational Unit Name [OU]",
|
string="Organizational Unit Name [OU]",
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
)
|
)
|
||||||
ebics_key_x509_dn_c = fields.Char(
|
ebics_key_x509_dn_c = fields.Char(
|
||||||
string="Country Name [C]",
|
string="Country Name [C]",
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
)
|
)
|
||||||
ebics_key_x509_dn_st = fields.Char(
|
ebics_key_x509_dn_st = fields.Char(
|
||||||
string="State Or Province Name [ST]",
|
string="State Or Province Name [ST]",
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
)
|
)
|
||||||
ebics_key_x509_dn_l = fields.Char(
|
ebics_key_x509_dn_l = fields.Char(
|
||||||
string="Locality Name [L]",
|
string="Locality Name [L]",
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
)
|
)
|
||||||
ebics_key_x509_dn_e = fields.Char(
|
ebics_key_x509_dn_e = fields.Char(
|
||||||
string="Email Address",
|
string="Email Address",
|
||||||
readonly=True,
|
|
||||||
states={"draft": [("readonly", False)]},
|
|
||||||
)
|
)
|
||||||
state = fields.Selection(
|
state = fields.Selection(
|
||||||
[
|
[
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<header>
|
<header>
|
||||||
<button
|
<button
|
||||||
name="set_to_draft"
|
name="set_to_draft"
|
||||||
states="confirm"
|
invisible="state != 'confirm'"
|
||||||
string="Set to Draft"
|
string="Set to Draft"
|
||||||
type="object"
|
type="object"
|
||||||
groups="account_ebics.group_ebics_manager"
|
groups="account_ebics.group_ebics_manager"
|
||||||
@ -30,7 +30,7 @@
|
|||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
name="set_to_confirm"
|
name="set_to_confirm"
|
||||||
states="draft"
|
invisible="state != 'draft'"
|
||||||
string="Confirm"
|
string="Confirm"
|
||||||
type="object"
|
type="object"
|
||||||
class="oe_highlight"
|
class="oe_highlight"
|
||||||
@ -44,38 +44,40 @@
|
|||||||
name="web_ribbon"
|
name="web_ribbon"
|
||||||
text="Archived"
|
text="Archived"
|
||||||
bg_color="bg-danger"
|
bg_color="bg-danger"
|
||||||
attrs="{'invisible': [('active', '=', True)]}"
|
invisible="active"
|
||||||
/>
|
/>
|
||||||
<group name="main">
|
<group name="main">
|
||||||
<group name="main-left">
|
<group name="main-left">
|
||||||
<field name="name" colspan="2" />
|
<field name="name" readonly="state != 'draft'" colspan="2" />
|
||||||
<field name="ebics_host" />
|
<field name="ebics_host" readonly="state != 'draft'" />
|
||||||
<field name="ebics_url" />
|
<field name="ebics_url" readonly="state != 'draft'" />
|
||||||
<field name="ebics_partner" />
|
<field name="ebics_partner" readonly="state != 'draft'" />
|
||||||
<field name="ebics_keys" />
|
<field name="ebics_keys" readonly="state != 'draft'" />
|
||||||
</group>
|
</group>
|
||||||
<group name="main-right">
|
<group name="main-right">
|
||||||
<field
|
<field
|
||||||
name="journal_ids"
|
name="journal_ids"
|
||||||
|
readonly="state != 'draft'"
|
||||||
widget="many2many_tags"
|
widget="many2many_tags"
|
||||||
options="{'no_create': True}"
|
options="{'no_create': True}"
|
||||||
/>
|
/>
|
||||||
<field name="ebics_version" />
|
<field name="ebics_version" readonly="state != 'draft'" />
|
||||||
<field name="ebics_key_version" />
|
<field name="ebics_key_version" readonly="state != 'draft'" />
|
||||||
<field name="ebics_key_bitlength" />
|
<field name="ebics_key_bitlength" readonly="state != 'draft'" />
|
||||||
<field
|
<field
|
||||||
name="order_number"
|
name="order_number"
|
||||||
attrs="{'invisible': [('ebics_version', '!=', 'H003')]}"
|
invisible="ebics_version != 'H003'"
|
||||||
|
readonly="state != 'draft'"
|
||||||
/>
|
/>
|
||||||
<field name="company_ids" widget="many2many_tags" invisible="1" />
|
<field name="company_ids" widget="many2many_tags" invisible="1" />
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="EBICS Users" groups="account_ebics.group_ebics_manager">
|
<page string="EBICS Users" groups="account_ebics.group_ebics_manager">
|
||||||
<field name="ebics_userid_ids" />
|
<field name="ebics_userid_ids" readonly="state != 'draft'" />
|
||||||
</page>
|
</page>
|
||||||
<page string="File Formats" groups="account_ebics.group_ebics_manager">
|
<page string="File Formats" groups="account_ebics.group_ebics_manager">
|
||||||
<field name="ebics_file_format_ids" />
|
<field name="ebics_file_format_ids" readonly="state != 'draft'" />
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
</form>
|
</form>
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<field name="suffix" />
|
<field name="suffix" />
|
||||||
<field
|
<field
|
||||||
name="download_process_method"
|
name="download_process_method"
|
||||||
attrs="{'invisible': [('type', '=', 'up')]}"
|
invisible="type == 'up'"
|
||||||
force_save="1"
|
force_save="1"
|
||||||
/>
|
/>
|
||||||
<field name="signature_class" />
|
<field name="signature_class" />
|
||||||
@ -37,40 +37,25 @@
|
|||||||
<field name="order_type" />
|
<field name="order_type" />
|
||||||
<field
|
<field
|
||||||
name="name"
|
name="name"
|
||||||
attrs="{'required': [('ebics_version', '=', '2')], 'invisible': [('ebics_version', '=', '3')]}"
|
required="ebics_version == '2'"
|
||||||
|
invisible="ebics_version == '3'"
|
||||||
/>
|
/>
|
||||||
<field
|
<field
|
||||||
name="btf_service"
|
name="btf_service"
|
||||||
attrs="{'required': [('ebics_version', '=', '3')], 'invisible': [('ebics_version', '=', '2')]}"
|
required="ebics_version == '3'"
|
||||||
|
invisible="ebics_version == '2'"
|
||||||
/>
|
/>
|
||||||
<field
|
<field
|
||||||
name="btf_message"
|
name="btf_message"
|
||||||
attrs="{'required': [('ebics_version', '=', '3')], 'invisible': [('ebics_version', '=', '2')]}"
|
required="ebics_version == '3'"
|
||||||
/>
|
invisible="ebics_version == '2'"
|
||||||
<field
|
|
||||||
name="btf_scope"
|
|
||||||
attrs="{'invisible': [('ebics_version', '=', '2')]}"
|
|
||||||
/>
|
|
||||||
<field
|
|
||||||
name="btf_option"
|
|
||||||
attrs="{'invisible': [('ebics_version', '=', '2')]}"
|
|
||||||
/>
|
|
||||||
<field
|
|
||||||
name="btf_container"
|
|
||||||
attrs="{'invisible': [('ebics_version', '=', '2')]}"
|
|
||||||
/>
|
|
||||||
<field
|
|
||||||
name="btf_version"
|
|
||||||
attrs="{'invisible': [('ebics_version', '=', '2')]}"
|
|
||||||
/>
|
|
||||||
<field
|
|
||||||
name="btf_variant"
|
|
||||||
attrs="{'invisible': [('ebics_version', '=', '2')]}"
|
|
||||||
/>
|
|
||||||
<field
|
|
||||||
name="btf_format"
|
|
||||||
attrs="{'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>
|
</group>
|
||||||
<group name="description">
|
<group name="description">
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
<header>
|
<header>
|
||||||
<button
|
<button
|
||||||
name="set_to_draft"
|
name="set_to_draft"
|
||||||
states="done"
|
invisible="state != 'done'"
|
||||||
string="Set to Draft"
|
string="Set to Draft"
|
||||||
type="object"
|
type="object"
|
||||||
groups="account.group_account_manager"
|
groups="account.group_account_manager"
|
||||||
@ -72,7 +72,7 @@
|
|||||||
<button
|
<button
|
||||||
name="process"
|
name="process"
|
||||||
class="oe_highlight"
|
class="oe_highlight"
|
||||||
states="draft"
|
invisible="state != 'draft'"
|
||||||
string="Process"
|
string="Process"
|
||||||
type="object"
|
type="object"
|
||||||
groups="account.group_account_invoice"
|
groups="account.group_account_invoice"
|
||||||
@ -80,7 +80,7 @@
|
|||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
name="set_to_done"
|
name="set_to_done"
|
||||||
states="draft"
|
invisible="state != 'draft'"
|
||||||
string="Set to Done"
|
string="Set to Done"
|
||||||
type="object"
|
type="object"
|
||||||
groups="account.group_account_manager"
|
groups="account.group_account_manager"
|
||||||
@ -106,10 +106,7 @@
|
|||||||
<page string="Additional Information">
|
<page string="Additional Information">
|
||||||
<field name="note" nolabel="1" />
|
<field name="note" nolabel="1" />
|
||||||
</page>
|
</page>
|
||||||
<page
|
<page string="Bank Statements" invisible="not bank_statement_ids">
|
||||||
string="Bank Statements"
|
|
||||||
attrs="{'invisible':[('bank_statement_ids','=',[])]}"
|
|
||||||
>
|
|
||||||
<field name="bank_statement_ids" nolabel="1" />
|
<field name="bank_statement_ids" nolabel="1" />
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
@ -193,14 +190,14 @@
|
|||||||
<header>
|
<header>
|
||||||
<button
|
<button
|
||||||
name="set_to_draft"
|
name="set_to_draft"
|
||||||
states="done"
|
invisible="state != 'done'"
|
||||||
string="Set to Draft"
|
string="Set to Draft"
|
||||||
type="object"
|
type="object"
|
||||||
groups="account.group_account_manager"
|
groups="account.group_account_manager"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
name="set_to_done"
|
name="set_to_done"
|
||||||
states="draft"
|
invisible="state != 'draft'"
|
||||||
string="Set to Done"
|
string="Set to Done"
|
||||||
type="object"
|
type="object"
|
||||||
groups="account.group_account_manager"
|
groups="account.group_account_manager"
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<header>
|
<header>
|
||||||
<button
|
<button
|
||||||
name="ebics_init_1"
|
name="ebics_init_1"
|
||||||
states="draft"
|
invisible="state != 'draft'"
|
||||||
string="EBICS Initialisation"
|
string="EBICS Initialisation"
|
||||||
type="object"
|
type="object"
|
||||||
class="oe_highlight"
|
class="oe_highlight"
|
||||||
@ -30,7 +30,7 @@
|
|||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
name="ebics_init_2"
|
name="ebics_init_2"
|
||||||
states="init"
|
invisible="state != 'init'"
|
||||||
string="Account activated"
|
string="Account activated"
|
||||||
type="object"
|
type="object"
|
||||||
class="oe_highlight"
|
class="oe_highlight"
|
||||||
@ -38,7 +38,7 @@
|
|||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
name="ebics_init_3"
|
name="ebics_init_3"
|
||||||
states="get_bank_keys"
|
invisible="state != 'get_bank_keys'"
|
||||||
string="Get Bank Keys"
|
string="Get Bank Keys"
|
||||||
type="object"
|
type="object"
|
||||||
class="oe_highlight"
|
class="oe_highlight"
|
||||||
@ -46,7 +46,7 @@
|
|||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
name="ebics_init_4"
|
name="ebics_init_4"
|
||||||
states="to_verify"
|
invisible="state != 'to_verify'"
|
||||||
string="Bank Keys Verified"
|
string="Bank Keys Verified"
|
||||||
type="object"
|
type="object"
|
||||||
class="oe_highlight"
|
class="oe_highlight"
|
||||||
@ -57,25 +57,25 @@
|
|||||||
string="Change Passphrase"
|
string="Change Passphrase"
|
||||||
type="object"
|
type="object"
|
||||||
class="oe_highlight"
|
class="oe_highlight"
|
||||||
attrs="{'invisible': ['|', ('ebics_keys_found', '=', False), ('state', '!=', 'active_keys')]}"
|
invisible="not ebics_keys_found or state != 'active_keys'"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
name="set_to_draft"
|
name="set_to_draft"
|
||||||
states="active_keys"
|
invisible="state != 'active_keys'"
|
||||||
string="Set to Draft"
|
string="Set to Draft"
|
||||||
type="object"
|
type="object"
|
||||||
help="Set to Draft in order to reinitialize your bank connection."
|
help="Set to Draft in order to reinitialize your bank connection."
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
name="set_to_get_bank_keys"
|
name="set_to_get_bank_keys"
|
||||||
states="active_keys"
|
invisible="state != 'active_keys'"
|
||||||
string="Renew Bank Keys"
|
string="Renew Bank Keys"
|
||||||
type="object"
|
type="object"
|
||||||
help="Use this button to update the EBICS certificates of your bank."
|
help="Use this button to update the EBICS certificates of your bank."
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
name="set_to_active_keys"
|
name="set_to_active_keys"
|
||||||
states="draft"
|
invisible="state != 'draft'"
|
||||||
string="Force Active Keys"
|
string="Force Active Keys"
|
||||||
type="object"
|
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."
|
help="Use this button to bypass the EBICS initialization (e.g. in case you have manually transferred active EBICS keys from another system."
|
||||||
@ -91,28 +91,29 @@
|
|||||||
<field name="ebics_passphrase_store_readonly" />
|
<field name="ebics_passphrase_store_readonly" />
|
||||||
<field name="ebics_sig_passphrase_invisible" invisible="1" />
|
<field name="ebics_sig_passphrase_invisible" invisible="1" />
|
||||||
</group>
|
</group>
|
||||||
<group name="main" attrs="{'readonly': [('state', '!=', 'draft')]}">
|
<group name="main" readonly="state != 'draft'">
|
||||||
<group name="main-left">
|
<group name="main-left">
|
||||||
<field name="name" />
|
<field name="name" readonly="state != 'draft'" />
|
||||||
<field
|
<field
|
||||||
name="ebics_passphrase"
|
name="ebics_passphrase"
|
||||||
password="True"
|
password="True"
|
||||||
attrs="{'required': [('ebics_passphrase_required', '=', True)], 'invisible': [('ebics_passphrase_invisible', '=', True)]}"
|
required="ebics_passphrase_required"
|
||||||
|
invisible="ebics_passphrase_invisible"
|
||||||
/>
|
/>
|
||||||
<field
|
<field
|
||||||
name="ebics_passphrase_store"
|
name="ebics_passphrase_store"
|
||||||
attrs="{'readonly': [('ebics_passphrase_store_readonly', '=', True)]}"
|
readonly="ebics_passphrase_store_readonly"
|
||||||
/>
|
/>
|
||||||
<field
|
<field
|
||||||
name="ebics_sig_passphrase"
|
name="ebics_sig_passphrase"
|
||||||
password="True"
|
password="True"
|
||||||
attrs="{'invisible': [('ebics_sig_passphrase_invisible', '=', True)]}"
|
invisible="ebics_sig_passphrase_invisible"
|
||||||
/>
|
/>
|
||||||
<field name="transaction_rights" />
|
<field name="transaction_rights" />
|
||||||
<field name="active" />
|
<field name="active" />
|
||||||
</group>
|
</group>
|
||||||
<group name="main-right">
|
<group name="main-right">
|
||||||
<field name="signature_class" />
|
<field name="signature_class" readonly="state != 'draft'" />
|
||||||
<field
|
<field
|
||||||
name="user_ids"
|
name="user_ids"
|
||||||
widget="many2many_tags"
|
widget="many2many_tags"
|
||||||
@ -121,51 +122,45 @@
|
|||||||
<!-- TODO: restore these fields after implementation of SWIFT SConnect
|
<!-- TODO: restore these fields after implementation of SWIFT SConnect
|
||||||
<field
|
<field
|
||||||
name="swift_3skey"
|
name="swift_3skey"
|
||||||
attrs="{'invisible': [('signature_class', '=', 'T')]}"
|
invisible="signature_class == 'T'"
|
||||||
/>
|
/>
|
||||||
<field name="swift_3skey_certificate_fn" invisible="1" />
|
<field name="swift_3skey_certificate_fn" invisible="1" />
|
||||||
<field
|
<field
|
||||||
name="swift_3skey_certificate"
|
name="swift_3skey_certificate"
|
||||||
filename="swift_3skey_certificate_fn"
|
filename="swift_3skey_certificate_fn"
|
||||||
attrs="{'invisible': [('swift_3skey', '=', False)], 'required': [('swift_3skey', '=', True)]}"
|
invisible="not swift_3skey"
|
||||||
|
required="swift_3skey"
|
||||||
/>
|
/>
|
||||||
-->
|
-->
|
||||||
<field name="ebics_key_x509" />
|
<field name="ebics_key_x509" readonly="state != 'draft'" />
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group
|
<group name="dn" invisible="not ebics_key_x509" readonly="state != 'draft'">
|
||||||
name="dn"
|
|
||||||
attrs="{'invisible': [('ebics_key_x509', '=', False)], 'readonly': [('state', '!=', 'draft')]}"
|
|
||||||
>
|
|
||||||
<div colspan="2" col="1">
|
<div colspan="2" col="1">
|
||||||
<strong
|
<strong
|
||||||
>Distinguished Name attributes used to create self-signed X.509 certificates:</strong>
|
>Distinguished Name attributes used to create self-signed X.509 certificates:</strong>
|
||||||
</div>
|
</div>
|
||||||
<group name="dn_l">
|
<group name="dn_l">
|
||||||
<field name="ebics_key_x509_dn_cn" />
|
<field name="ebics_key_x509_dn_cn" readonly="state != 'draft'" />
|
||||||
<field name="ebics_key_x509_dn_o" />
|
<field name="ebics_key_x509_dn_o" readonly="state != 'draft'" />
|
||||||
<field name="ebics_key_x509_dn_l" />
|
<field name="ebics_key_x509_dn_l" readonly="state != 'draft'" />
|
||||||
<field name="ebics_key_x509_dn_c" />
|
<field name="ebics_key_x509_dn_c" readonly="state != 'draft'" />
|
||||||
</group>
|
</group>
|
||||||
<group name="dn_r">
|
<group name="dn_r">
|
||||||
<field name="ebics_key_x509_dn_e" />
|
<field name="ebics_key_x509_dn_e" readonly="state != 'draft'" />
|
||||||
<field name="ebics_key_x509_dn_ou" />
|
<field name="ebics_key_x509_dn_ou" readonly="state != 'draft'" />
|
||||||
<field name="ebics_key_x509_dn_st" />
|
<field name="ebics_key_x509_dn_st" readonly="state != 'draft'" />
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group name="files">
|
<group name="files">
|
||||||
<group
|
<group colspan="2" name="ebics_ini_letter" invisible="not ebics_ini_letter">
|
||||||
colspan="2"
|
|
||||||
name="ebics_ini_letter"
|
|
||||||
attrs="{'invisible': [('ebics_ini_letter', '=', False)]}"
|
|
||||||
>
|
|
||||||
<field name="ebics_ini_letter_fn" invisible="1" />
|
<field name="ebics_ini_letter_fn" invisible="1" />
|
||||||
<field name="ebics_ini_letter" filename="ebics_ini_letter_fn" />
|
<field name="ebics_ini_letter" filename="ebics_ini_letter_fn" />
|
||||||
</group>
|
</group>
|
||||||
<group
|
<group
|
||||||
colspan="2"
|
colspan="2"
|
||||||
name="ebics_public_bank_keys"
|
name="ebics_public_bank_keys"
|
||||||
attrs="{'invisible': [('ebics_public_bank_keys', '=', False)]}"
|
invisible="not ebics_public_bank_keys"
|
||||||
>
|
>
|
||||||
<field name="ebics_public_bank_keys_fn" invisible="1" />
|
<field name="ebics_public_bank_keys_fn" invisible="1" />
|
||||||
<field name="ebics_public_bank_keys" filename="ebics_public_bank_keys_fn" />
|
<field name="ebics_public_bank_keys" filename="ebics_public_bank_keys_fn" />
|
||||||
|
@ -13,10 +13,7 @@
|
|||||||
<field name="new_pass" password="True" />
|
<field name="new_pass" password="True" />
|
||||||
<field name="new_pass_check" password="True" />
|
<field name="new_pass_check" password="True" />
|
||||||
</group>
|
</group>
|
||||||
<group
|
<group name="sig_pass" invisible="ebics_sig_passphrase_invisible">
|
||||||
name="sig_pass"
|
|
||||||
attrs="{'invisible': [('ebics_sig_passphrase_invisible', '=', True)]}"
|
|
||||||
>
|
|
||||||
<field name="old_sig_pass" password="True" />
|
<field name="old_sig_pass" password="True" />
|
||||||
<field name="new_sig_pass" password="True" />
|
<field name="new_sig_pass" password="True" />
|
||||||
<field name="new_sig_pass_check" password="True" />
|
<field name="new_sig_pass_check" password="True" />
|
||||||
|
@ -444,7 +444,9 @@ class EbicsXfer(models.TransientModel):
|
|||||||
def _payment_order_postprocess(self, ebics_file):
|
def _payment_order_postprocess(self, ebics_file):
|
||||||
active_model = self.env.context.get("active_model")
|
active_model = self.env.context.get("active_model")
|
||||||
if active_model == "account.payment.order":
|
if active_model == "account.payment.order":
|
||||||
order = self.env[active_model].browse(self.env.context["active_id"])
|
order = self.env["account.payment.order"].browse(
|
||||||
|
self.env.context["active_id"]
|
||||||
|
)
|
||||||
order.generated2uploaded()
|
order.generated2uploaded()
|
||||||
|
|
||||||
def _setup_client(self):
|
def _setup_client(self):
|
||||||
|
@ -23,7 +23,8 @@
|
|||||||
<field
|
<field
|
||||||
name="ebics_passphrase"
|
name="ebics_passphrase"
|
||||||
password="True"
|
password="True"
|
||||||
attrs="{'invisible': [('ebics_passphrase_store', '=', True)], 'required': [('ebics_passphrase_store', '=', False)]}"
|
invisible="ebics_passphrase_store"
|
||||||
|
required="not ebics_passphrase_store"
|
||||||
/>
|
/>
|
||||||
<field name="ebics_passphrase_store" invisible="1" />
|
<field name="ebics_passphrase_store" invisible="1" />
|
||||||
<field name="date_from" />
|
<field name="date_from" />
|
||||||
@ -76,12 +77,13 @@
|
|||||||
<field
|
<field
|
||||||
name="ebics_passphrase"
|
name="ebics_passphrase"
|
||||||
password="True"
|
password="True"
|
||||||
attrs="{'invisible': [('ebics_passphrase_store', '=', True)], 'required': [('ebics_passphrase_store', '=', False)]}"
|
invisible="ebics_passphrase_store"
|
||||||
|
required="not ebics_passphrase_store"
|
||||||
/>
|
/>
|
||||||
<field
|
<field
|
||||||
name="ebics_sig_passphrase"
|
name="ebics_sig_passphrase"
|
||||||
password="True"
|
password="True"
|
||||||
attrs="{'invisible': [('ebics_sig_passphrase_invisible', '=', True)]}"
|
invisible="ebics_sig_passphrase_invisible"
|
||||||
/>
|
/>
|
||||||
<field name="ebics_passphrase_store" invisible="1" />
|
<field name="ebics_passphrase_store" invisible="1" />
|
||||||
<field name="ebics_sig_passphrase_invisible" invisible="1" />
|
<field name="ebics_sig_passphrase_invisible" invisible="1" />
|
||||||
@ -95,10 +97,7 @@
|
|||||||
domain="[('type', '=', 'up'), ('id', 'in', allowed_format_ids)]"
|
domain="[('type', '=', 'up'), ('id', 'in', allowed_format_ids)]"
|
||||||
/>
|
/>
|
||||||
<field name="order_type" />
|
<field name="order_type" />
|
||||||
<field
|
<field name="test_mode" invisible="order_type not in ('FUL', 'BTU')" />
|
||||||
name="test_mode"
|
|
||||||
attrs="{'invisible': [('order_type', 'not in', ('FUL', 'BTU'))]}"
|
|
||||||
/>
|
|
||||||
<field name="allowed_format_ids" invisible="1" />
|
<field name="allowed_format_ids" invisible="1" />
|
||||||
</group>
|
</group>
|
||||||
<footer>
|
<footer>
|
||||||
|
Loading…
Reference in New Issue
Block a user