[IMP] account{_peppol}: allow install via settings
Currently it is not easily discoverable that users can install the PEPPOL module. They have to go to the Apps list and search for PEPPOL there. In order to make the installation easy and discoverable, we added a checkbox to the Invoicing/Accounting settings to install the module and afterwards show the checkbox to enable PEPPOL per company. The install checkbox is only shown when editing the settings of a company that is eligible for PEPPOL to avoid confusion. In order to do that, we created a `PEPPOL_LIST` variable in `account` containing all countries currently allowed to use PEPPOL. The code in `account_peppol` formerly using the `EAS_MAPPING` variable of the `account_edi_ubl_cii` module is now also using this new list. task-3519564 closes odoo/odoo#137287 Signed-off-by: Laurent Smet (las) <las@odoo.com>
This commit is contained in:
@@ -26,6 +26,12 @@ MONTH_SELECTION = [
|
||||
('12', 'December'),
|
||||
]
|
||||
|
||||
PEPPOL_LIST = [
|
||||
'AD', 'AL', 'AT', 'BA', 'BE', 'BG', 'CH', 'CY', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FI',
|
||||
'FR', 'GB', 'GR', 'HR', 'HU', 'IE', 'IS', 'IT', 'LI', 'LT', 'LU', 'LV', 'MC', 'ME',
|
||||
'MK', 'MT', 'NL', 'NO', 'PL', 'PT', 'RO', 'RS', 'SE', 'SI', 'SK', 'SM', 'TR', 'VA',
|
||||
]
|
||||
|
||||
class ResCompany(models.Model):
|
||||
_name = "res.company"
|
||||
_inherit = ["res.company", "mail.thread"]
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
from odoo import _, api, fields, models
|
||||
|
||||
from odoo.addons.account.models.company import PEPPOL_LIST
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
@@ -117,6 +119,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
module_account_avatax = fields.Boolean(string="Account Avatax")
|
||||
module_account_invoice_extract = fields.Boolean(string="Document Digitization")
|
||||
module_snailmail_account = fields.Boolean(string="Snailmail")
|
||||
module_account_peppol = fields.Boolean(string='PEPPOL Invoicing')
|
||||
tax_exigibility = fields.Boolean(string='Cash Basis', related='company_id.tax_exigibility', readonly=False)
|
||||
tax_cash_basis_journal_id = fields.Many2one(
|
||||
'account.journal',
|
||||
@@ -208,6 +211,19 @@ class ResConfigSettings(models.TransientModel):
|
||||
domain="[('account_type', 'in', ('income', 'expense'))]",
|
||||
)
|
||||
|
||||
# PEPPOL
|
||||
is_account_peppol_eligible = fields.Boolean(
|
||||
string='PEPPOL eligible',
|
||||
compute='_compute_is_account_peppol_eligible',
|
||||
) # technical field used for showing the Peppol settings conditionally
|
||||
|
||||
@api.depends('country_code')
|
||||
def _compute_is_account_peppol_eligible(self):
|
||||
# we want to show Peppol settings only to customers that are eligible for Peppol,
|
||||
# except countries that are not in Europe
|
||||
for config in self:
|
||||
config.is_account_peppol_eligible = config.country_code in PEPPOL_LIST
|
||||
|
||||
def set_values(self):
|
||||
super().set_values()
|
||||
# install a chart of accounts for the given company (if required)
|
||||
|
||||
@@ -348,6 +348,21 @@
|
||||
<field name="module_product_margin"/>
|
||||
</setting>
|
||||
</block>
|
||||
<field name="is_account_peppol_eligible" invisible="1"/>
|
||||
<block title="PEPPOL Electronic Document Invoicing" id="peppol" invisible="not is_account_peppol_eligible">
|
||||
<div class="col-12 col-lg-12 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_peppol" readonly="False"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_account_peppol" string="Enable PEPPOL"/>
|
||||
<div class="text-muted">
|
||||
Allow sending and receiving invoices through the PEPPOL network
|
||||
</div>
|
||||
<div id="account_peppol"/>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
<block title="Storno Accounting" id="storno">
|
||||
<setting id="enable_storno_accounting" company_dependent="1" help="Use Storno accounting" title="Allows you to use Storno accounting.">
|
||||
<field name="account_storno"/>
|
||||
|
||||
@@ -212,11 +212,6 @@ msgstr ""
|
||||
msgid "PEPPOL"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_peppol
|
||||
#: model_terms:ir.ui.view,arch_db:account_peppol.res_config_settings_view_form
|
||||
msgid "PEPPOL Electronic Document Invoicing"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_peppol
|
||||
#: model:ir.model.fields,field_description:account_peppol.field_res_company__is_account_peppol_participant
|
||||
msgid "PEPPOL Participant"
|
||||
@@ -228,11 +223,6 @@ msgstr ""
|
||||
msgid "PEPPOL Purchase Journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_peppol
|
||||
#: model:ir.model.fields,field_description:account_peppol.field_res_config_settings__is_account_peppol_eligible
|
||||
msgid "PEPPOL eligible"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_peppol
|
||||
#: model:ir.model.fields,field_description:account_peppol.field_res_partner__account_peppol_is_endpoint_valid
|
||||
#: model:ir.model.fields,field_description:account_peppol.field_res_users__account_peppol_is_endpoint_valid
|
||||
|
||||
@@ -6,15 +6,13 @@ from stdnum import get_cc_module, ean
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.addons.account_edi_ubl_cii.models.account_edi_common import EAS_MAPPING
|
||||
from odoo.addons.account.models.company import PEPPOL_LIST
|
||||
|
||||
try:
|
||||
import phonenumbers
|
||||
except ImportError:
|
||||
phonenumbers = None
|
||||
|
||||
# at the moment, only phone numbers in European countries are accepted
|
||||
PHONE_ALLOWED_COUNTRIES = set(EAS_MAPPING.keys()) - {'AU', 'SG', 'NZ'}
|
||||
|
||||
PEPPOL_ENDPOINT_RULES = {
|
||||
'0007': ['se', 'orgnr'],
|
||||
@@ -95,7 +93,7 @@ class ResCompany(models.Model):
|
||||
raise ValidationError(error_message)
|
||||
|
||||
country_code = phonenumbers.phonenumberutil.region_code_for_number(phone_nbr)
|
||||
if country_code not in PHONE_ALLOWED_COUNTRIES or not phonenumbers.is_valid_number(phone_nbr):
|
||||
if country_code not in PEPPOL_LIST or not phonenumbers.is_valid_number(phone_nbr):
|
||||
raise ValidationError(error_message)
|
||||
|
||||
def _check_peppol_endpoint_number(self, warning=False):
|
||||
|
||||
@@ -5,10 +5,6 @@ from odoo import _, api, fields, models, modules, tools
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
from odoo.addons.account_edi_proxy_client.models.account_edi_proxy_user import AccountEdiProxyError
|
||||
from odoo.addons.account_edi_ubl_cii.models.account_edi_common import EAS_MAPPING
|
||||
|
||||
# at the moment, only European countries are accepted
|
||||
ALLOWED_COUNTRIES = set(EAS_MAPPING.keys()) - {'AU', 'SG', 'NZ'}
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
@@ -32,15 +28,14 @@ class ResConfigSettings(models.TransientModel):
|
||||
account_peppol_proxy_state = fields.Selection(related='company_id.account_peppol_proxy_state', readonly=False)
|
||||
account_peppol_purchase_journal_id = fields.Many2one(related='company_id.peppol_purchase_journal_id', readonly=False)
|
||||
account_peppol_verification_code = fields.Char(related='account_peppol_edi_user.peppol_verification_code', readonly=False)
|
||||
is_account_peppol_eligible = fields.Boolean(
|
||||
string='PEPPOL eligible',
|
||||
compute='_compute_is_account_peppol_eligible',
|
||||
) # technical field used for showing the Peppol settings conditionally
|
||||
is_account_peppol_participant = fields.Boolean(
|
||||
string='Use PEPPOL',
|
||||
related='company_id.is_account_peppol_participant', readonly=False,
|
||||
help='Register as a PEPPOL user',
|
||||
)
|
||||
has_peppol_participant = fields.Boolean(
|
||||
compute='_compute_has_peppol_participant'
|
||||
)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# HELPER METHODS
|
||||
@@ -67,18 +62,6 @@ class ResConfigSettings(models.TransientModel):
|
||||
# COMPUTE METHODS
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
@api.depends("company_id.country_id")
|
||||
def _compute_is_account_peppol_eligible(self):
|
||||
# we want to show Peppol settings only to customers that are eligible for Peppol,
|
||||
# except countries that are not in Europe
|
||||
# but keeping an option to see them for testing purposes using a config param
|
||||
for config in self:
|
||||
peppol_param = config.env['ir.config_parameter'].sudo().get_param(
|
||||
'account_peppol.edi.mode', False
|
||||
)
|
||||
config.is_account_peppol_eligible = config.company_id.country_id.code in ALLOWED_COUNTRIES \
|
||||
or peppol_param == 'test'
|
||||
|
||||
@api.depends("company_id.account_edi_proxy_client_ids")
|
||||
def _compute_account_peppol_edi_user(self):
|
||||
for config in self:
|
||||
@@ -97,6 +80,14 @@ class ResConfigSettings(models.TransientModel):
|
||||
config.account_peppol_endpoint_warning = _("The endpoint number might not be correct. "
|
||||
"Please check if you entered the right identification number.")
|
||||
|
||||
@api.depends('company_id.is_account_peppol_participant')
|
||||
def _compute_has_peppol_participant(self):
|
||||
number_of_peppol_participants = len(self.env['res.company'].sudo().search([
|
||||
('is_account_peppol_participant', '=', True)
|
||||
]))
|
||||
for config in self:
|
||||
config.has_peppol_participant = number_of_peppol_participants > 0
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# BUSINESS ACTIONS
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
@@ -5,164 +5,164 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<block id="analytic" position="after">
|
||||
<block title="PEPPOL Electronic Document Invoicing">
|
||||
<field name="is_account_peppol_eligible" invisible="1"/>
|
||||
<div invisible="not is_account_peppol_eligible">
|
||||
<div id='account_peppol'>
|
||||
<div class="col-12 col-lg-12 o_setting_box">
|
||||
<field name="account_peppol_proxy_state" invisible="1"/>
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="is_account_peppol_participant"
|
||||
invisible="account_peppol_proxy_state != 'not_registered'"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<div invisible="account_peppol_proxy_state != 'not_registered'">
|
||||
<label for="is_account_peppol_participant" string='Use PEPPOL Invoicing'/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific."/>
|
||||
<div class="text-muted">
|
||||
Start sending and receiving documents via Peppol as soon as your registration is complete.
|
||||
</div>
|
||||
<div class="alert alert-warning mt-3"
|
||||
role="alert"
|
||||
invisible="not is_account_peppol_participant or not account_peppol_endpoint_warning">
|
||||
<field name="account_peppol_endpoint_warning"/>
|
||||
</div>
|
||||
<div class="pt-3"
|
||||
invisible="not is_account_peppol_participant">
|
||||
<div class="row">
|
||||
<label string="Peppol EAS"
|
||||
for="account_peppol_eas"
|
||||
class="col-lg-3 o_light_label"/>
|
||||
<field name="account_peppol_eas"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label string="Peppol Endpoint"
|
||||
for="account_peppol_eas"
|
||||
class="col-lg-3 o_light_label"/>
|
||||
<field name="account_peppol_endpoint"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="account_peppol" position="replace">
|
||||
<field name="has_peppol_participant" invisible="1"/>
|
||||
<div id="account_peppol" class="mt-3">
|
||||
<div class="col-12 col-lg-12 o_setting_box">
|
||||
<field name="account_peppol_proxy_state" invisible="1"/>
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="is_account_peppol_participant"
|
||||
invisible="account_peppol_proxy_state != 'not_registered'"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane border-0">
|
||||
<div invisible="account_peppol_proxy_state != 'not_registered'">
|
||||
<label for="is_account_peppol_participant" string="Use PEPPOL Invoicing"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific."/>
|
||||
<div class="text-muted">
|
||||
Start sending and receiving documents via Peppol as soon as your registration is complete.
|
||||
</div>
|
||||
<div class="row"
|
||||
invisible="not is_account_peppol_participant or account_peppol_proxy_state not in ('not_registered', 'not_verified')">
|
||||
<label string="Phone Number"
|
||||
for="account_peppol_phone_number"
|
||||
class="col-lg-3 o_light_label"/>
|
||||
<field name="account_peppol_phone_number"
|
||||
required="is_account_peppol_participant and account_peppol_proxy_state in ('not_registered', 'not_verified')"/>
|
||||
<div class="alert alert-warning mt-3"
|
||||
role="alert"
|
||||
invisible="not is_account_peppol_participant or not account_peppol_endpoint_warning">
|
||||
<field name="account_peppol_endpoint_warning"/>
|
||||
</div>
|
||||
<div class="row"
|
||||
invisible="not is_account_peppol_participant or account_peppol_proxy_state in ('rejected', 'canceled', 'sent_verification')">
|
||||
<label string="Primary contact email"
|
||||
for="account_peppol_contact_email"
|
||||
class="col-lg-3 o_light_label"/>
|
||||
<field name="account_peppol_contact_email"
|
||||
required="is_account_peppol_participant"/>
|
||||
</div>
|
||||
<div class="content-group pt-3"
|
||||
invisible="account_peppol_proxy_state != 'not_registered' or not is_account_peppol_participant">
|
||||
<span>
|
||||
I want to migrate my Peppol connection to Odoo (optional):
|
||||
</span>
|
||||
<div class="row mt-3">
|
||||
<label string="Migration key"
|
||||
for="account_peppol_migration_key"
|
||||
class="col-lg-3 o_light_label"/>
|
||||
<field name="account_peppol_migration_key"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3"
|
||||
<div class="pt-3"
|
||||
invisible="not is_account_peppol_participant">
|
||||
<div class="content-group mt-3"
|
||||
invisible="account_peppol_proxy_state in ('rejected', 'not_registered', 'canceled', 'not_verified', 'sent_verification')">
|
||||
<div class="row">
|
||||
<label string="Incoming Invoices Journal"
|
||||
for="account_peppol_purchase_journal_id"
|
||||
class="col-lg-3 o_light_label"/>
|
||||
<field name="account_peppol_purchase_journal_id"
|
||||
required="is_account_peppol_participant and account_peppol_proxy_state not in ('rejected', 'not_registered', 'canceled', 'not_verified', 'sent_verification')"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label string="Peppol EAS"
|
||||
for="account_peppol_eas"
|
||||
class="col-lg-3 o_light_label"/>
|
||||
<field name="account_peppol_eas"/>
|
||||
</div>
|
||||
<div class="content-group mt-3"
|
||||
invisible="account_peppol_proxy_state != 'sent_verification'">
|
||||
<span class="text-muted">
|
||||
We sent a verification code to
|
||||
<field name="account_peppol_phone_number"
|
||||
nolabel="1"
|
||||
readonly="is_account_peppol_participant and account_peppol_proxy_state == 'sent_verification'"/>.
|
||||
</span>
|
||||
<div class="row mt-1 ps-3">
|
||||
<field name="account_peppol_verification_code" widget="verification_code"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label string="Peppol Endpoint"
|
||||
for="account_peppol_eas"
|
||||
class="col-lg-3 o_light_label"/>
|
||||
<field name="account_peppol_endpoint"/>
|
||||
</div>
|
||||
<div class="pt-3 pb-3"
|
||||
invisible="account_peppol_proxy_state == 'not_registered'">
|
||||
Application status:
|
||||
<b>
|
||||
<field name="account_peppol_proxy_state"
|
||||
readonly="1"
|
||||
decoration-danger="account_peppol_proxy_state == 'rejected'"
|
||||
decoration-info="account_peppol_proxy_state == 'active'"/>
|
||||
</b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"
|
||||
invisible="not is_account_peppol_participant or account_peppol_proxy_state not in ('not_registered', 'not_verified')">
|
||||
<label string="Phone Number"
|
||||
for="account_peppol_phone_number"
|
||||
class="col-lg-3 o_light_label"/>
|
||||
<field name="account_peppol_phone_number"
|
||||
required="is_account_peppol_participant and account_peppol_proxy_state in ('not_registered', 'not_verified')"/>
|
||||
</div>
|
||||
<div class="row"
|
||||
invisible="not is_account_peppol_participant or account_peppol_proxy_state in ('rejected', 'canceled', 'sent_verification')">
|
||||
<label string="Primary contact email"
|
||||
for="account_peppol_contact_email"
|
||||
class="col-lg-3 o_light_label"/>
|
||||
<field name="account_peppol_contact_email"
|
||||
required="is_account_peppol_participant"/>
|
||||
</div>
|
||||
<div class="content-group pt-3"
|
||||
invisible="account_peppol_proxy_state != 'not_registered' or not is_account_peppol_participant">
|
||||
<span>
|
||||
I want to migrate my Peppol connection to Odoo (optional):
|
||||
</span>
|
||||
<div class="row mt-3">
|
||||
<label string="Migration key"
|
||||
for="account_peppol_migration_key"
|
||||
class="col-lg-3 o_light_label"/>
|
||||
<field name="account_peppol_migration_key"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3"
|
||||
invisible="not is_account_peppol_participant">
|
||||
<div class="content-group mt-3"
|
||||
invisible="account_peppol_proxy_state in ('rejected', 'not_registered', 'canceled', 'not_verified', 'sent_verification')">
|
||||
<div class="row">
|
||||
<label string="Incoming Invoices Journal"
|
||||
for="account_peppol_purchase_journal_id"
|
||||
class="col-lg-3 o_light_label"/>
|
||||
<field name="account_peppol_purchase_journal_id"
|
||||
required="is_account_peppol_participant and account_peppol_proxy_state not in ('rejected', 'not_registered', 'canceled', 'not_verified', 'sent_verification')"/>
|
||||
</div>
|
||||
<div invisible="account_peppol_proxy_state != 'rejected'">
|
||||
<p>
|
||||
The rejection reason has been sent to you via email.
|
||||
</p>
|
||||
<p>
|
||||
Please do not hesitate to contact our support if you need further assistance.
|
||||
</p>
|
||||
</div>
|
||||
<div invisible="account_peppol_proxy_state != 'active' or not account_peppol_migration_key">
|
||||
Your migration key is:
|
||||
<field name="account_peppol_migration_key"
|
||||
</div>
|
||||
<div class="content-group mt-3"
|
||||
invisible="account_peppol_proxy_state != 'sent_verification'">
|
||||
<span class="text-muted">
|
||||
We sent a verification code to
|
||||
<field name="account_peppol_phone_number"
|
||||
nolabel="1"
|
||||
readonly="account_peppol_proxy_state == 'active' and account_peppol_migration_key"/>
|
||||
readonly="is_account_peppol_participant and account_peppol_proxy_state == 'sent_verification'"/>.
|
||||
</span>
|
||||
<div class="row mt-1 ps-3">
|
||||
<field name="account_peppol_verification_code" widget="verification_code"/>
|
||||
</div>
|
||||
<div invisible="account_peppol_proxy_state != 'active'">
|
||||
Your Peppol identification is:
|
||||
<field name="account_peppol_edi_identification"
|
||||
nolabel="1"/>
|
||||
</div>
|
||||
<div class="pt-3 pb-3"
|
||||
invisible="account_peppol_proxy_state == 'not_registered'">
|
||||
Application status:
|
||||
<b>
|
||||
<field name="account_peppol_proxy_state"
|
||||
readonly="1"
|
||||
decoration-danger="account_peppol_proxy_state == 'rejected'"
|
||||
decoration-info="account_peppol_proxy_state == 'active'"/>
|
||||
</b>
|
||||
</div>
|
||||
<div invisible="account_peppol_proxy_state != 'rejected'">
|
||||
<p>
|
||||
The rejection reason has been sent to you via email.
|
||||
</p>
|
||||
<p>
|
||||
Please do not hesitate to contact our support if you need further assistance.
|
||||
</p>
|
||||
</div>
|
||||
<div invisible="account_peppol_proxy_state != 'active' or not account_peppol_migration_key">
|
||||
Your migration key is:
|
||||
<field name="account_peppol_migration_key"
|
||||
nolabel="1"
|
||||
readonly="account_peppol_proxy_state == 'active' and account_peppol_migration_key"/>
|
||||
</div>
|
||||
<div invisible="account_peppol_proxy_state != 'active'">
|
||||
Your Peppol identification is:
|
||||
<field name="account_peppol_edi_identification"
|
||||
nolabel="1"/>
|
||||
</div>
|
||||
<div class="mt-5"
|
||||
invisible="account_peppol_proxy_state != 'not_registered'">
|
||||
<div class="mb-3">
|
||||
I accept that Odoo may process my e-invoices.
|
||||
</div>
|
||||
<div class="mt-5"
|
||||
invisible="account_peppol_proxy_state != 'not_registered'">
|
||||
<div class="mb-3">
|
||||
I accept that Odoo may process my e-invoices.
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex gap-1 action_buttons" colspan="3">
|
||||
<div class="mt-3"
|
||||
invisible="account_peppol_proxy_state != 'not_verified'">
|
||||
<button name="button_send_peppol_verification_code"
|
||||
type="object"
|
||||
string="Verify phone number"
|
||||
class="btn btn-primary"/>
|
||||
</div>
|
||||
<div class="d-flex gap-1 action_buttons" colspan="3">
|
||||
<div class="mt-3"
|
||||
invisible="account_peppol_proxy_state != 'not_verified'">
|
||||
<button name="button_send_peppol_verification_code"
|
||||
type="object"
|
||||
string="Verify phone number"
|
||||
class="btn btn-primary"/>
|
||||
</div>
|
||||
<widget name="peppol_settings_buttons"
|
||||
invisible="account_peppol_proxy_state not in ('not_registered', 'sent_verification', 'pending', 'manually_approved', 'active')"/>
|
||||
<div class="mt-3"
|
||||
invisible="account_peppol_proxy_state in ('not_registered', 'active', 'rejected', 'canceled')">
|
||||
<button name="button_cancel_peppol_registration"
|
||||
type="object"
|
||||
string="Cancel registration"
|
||||
class="btn btn-secondary"/>
|
||||
</div>
|
||||
<div class="mt-3"
|
||||
invisible="account_peppol_proxy_state != 'canceled' or account_peppol_migration_key">
|
||||
<button name="button_reopen_peppol_registration"
|
||||
type="object"
|
||||
string="Retry registration"
|
||||
class="btn btn-secondary"/>
|
||||
</div>
|
||||
<widget name="peppol_settings_buttons"
|
||||
invisible="account_peppol_proxy_state not in ('not_registered', 'sent_verification', 'pending', 'manually_approved', 'active')"/>
|
||||
<div class="mt-3"
|
||||
invisible="account_peppol_proxy_state in ('not_registered', 'active', 'rejected', 'canceled')">
|
||||
<button name="button_cancel_peppol_registration"
|
||||
type="object"
|
||||
string="Cancel registration"
|
||||
class="btn btn-secondary"/>
|
||||
</div>
|
||||
<div class="mt-3"
|
||||
invisible="account_peppol_proxy_state != 'canceled' or account_peppol_migration_key">
|
||||
<button name="button_reopen_peppol_registration"
|
||||
type="object"
|
||||
string="Retry registration"
|
||||
class="btn btn-secondary"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
</block>
|
||||
</div>
|
||||
<field name="module_account_peppol" position="attributes">
|
||||
<!-- When any company has Peppol enabled, we prevent users from accidentally uninstalling the module -->
|
||||
<attribute name="readonly">has_peppol_participant</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user