From f4b56dc0e941eed01259edd2c09a8da2733de9ca Mon Sep 17 00:00:00 2001 From: "Claire Bretton (clbr)" Date: Mon, 18 Mar 2024 10:11:13 +0100 Subject: [PATCH] [FIX] account_{edi_ubl_cii,peppol},l10n_{es,it}_edi_{facturae},snailmail_account: fix Send & Print only Clean the implementation + missing peppol, ubl and snailmail. closes odoo/odoo#157977 Related: odoo/enterprise#58819 Signed-off-by: Laurent Smet (las) --- addons/account_edi_ubl_cii/wizard/account_move_send.py | 9 +++++++++ addons/account_peppol/wizard/account_move_send.py | 9 +++++++++ addons/l10n_es_edi_facturae/wizard/account_move_send.py | 3 +-- addons/l10n_it_edi/wizard/account_move_send.py | 3 +-- addons/snailmail_account/wizard/account_move_send.py | 9 +++++++++ 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/addons/account_edi_ubl_cii/wizard/account_move_send.py b/addons/account_edi_ubl_cii/wizard/account_move_send.py index e31c5774272..c04f559b547 100644 --- a/addons/account_edi_ubl_cii/wizard/account_move_send.py +++ b/addons/account_edi_ubl_cii/wizard/account_move_send.py @@ -26,6 +26,15 @@ class AccountMoveSend(models.TransientModel): values['ubl_cii_xml'] = self.checkbox_ubl_cii_xml return values + @api.model + def _get_wizard_vals_restrict_to(self, only_options): + # EXTENDS 'account' + values = super()._get_wizard_vals_restrict_to(only_options) + return { + 'checkbox_ubl_cii_xml': False, + **values, + } + # ------------------------------------------------------------------------- # COMPUTE METHODS # ------------------------------------------------------------------------- diff --git a/addons/account_peppol/wizard/account_move_send.py b/addons/account_peppol/wizard/account_move_send.py index 2be2f2a6c2f..929872c94f4 100644 --- a/addons/account_peppol/wizard/account_move_send.py +++ b/addons/account_peppol/wizard/account_move_send.py @@ -29,6 +29,15 @@ class AccountMoveSend(models.TransientModel): values['send_peppol'] = self.checkbox_send_peppol return values + @api.model + def _get_wizard_vals_restrict_to(self, only_options): + # EXTENDS 'account' + values = super()._get_wizard_vals_restrict_to(only_options) + return { + 'checkbox_send_peppol': False, + **values, + } + # ------------------------------------------------------------------------- # COMPUTE METHODS # ------------------------------------------------------------------------- diff --git a/addons/l10n_es_edi_facturae/wizard/account_move_send.py b/addons/l10n_es_edi_facturae/wizard/account_move_send.py index 9cea2344da9..33e8813210d 100644 --- a/addons/l10n_es_edi_facturae/wizard/account_move_send.py +++ b/addons/l10n_es_edi_facturae/wizard/account_move_send.py @@ -21,9 +21,8 @@ class AccountMoveSend(models.TransientModel): # EXTENDS 'account' values = super()._get_wizard_vals_restrict_to(only_options) return { - **values, 'l10n_es_edi_facturae_checkbox_xml': False, - **only_options, + **values, } # ------------------------------------------------------------------------- diff --git a/addons/l10n_it_edi/wizard/account_move_send.py b/addons/l10n_it_edi/wizard/account_move_send.py index b64c7df313c..c572493ef83 100644 --- a/addons/l10n_it_edi/wizard/account_move_send.py +++ b/addons/l10n_it_edi/wizard/account_move_send.py @@ -38,10 +38,9 @@ class AccountMoveSend(models.TransientModel): # EXTENDS 'account' values = super()._get_wizard_vals_restrict_to(only_options) return { - **values, 'l10n_it_edi_checkbox_xml_export': False, 'l10n_it_edi_checkbox_send': False, - **only_options, + **values, } # ------------------------------------------------------------------------- diff --git a/addons/snailmail_account/wizard/account_move_send.py b/addons/snailmail_account/wizard/account_move_send.py index fb38e3324be..54ed9e2db6c 100644 --- a/addons/snailmail_account/wizard/account_move_send.py +++ b/addons/snailmail_account/wizard/account_move_send.py @@ -23,6 +23,15 @@ class AccountMoveSend(models.TransientModel): values['send_by_post'] = self.checkbox_send_by_post return values + @api.model + def _get_wizard_vals_restrict_to(self, only_options): + # EXTENDS 'account' + values = super()._get_wizard_vals_restrict_to(only_options) + return { + 'checkbox_send_by_post': False, + **values, + } + # ------------------------------------------------------------------------- # COMPUTE METHODS # -------------------------------------------------------------------------