Skip to content

Commit

Permalink
[FIX] account_{edi_ubl_cii,peppol},l10n_{es,it}_edi_{facturae},snailm…
Browse files Browse the repository at this point in the history
…ail_account: fix Send & Print only

Clean the implementation + missing peppol, ubl and snailmail.

closes #159324

X-original-commit: f4b56dc
Related: odoo/enterprise#59446
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
  • Loading branch information
clbr-odoo committed Mar 27, 2024
1 parent 11ba3a0 commit 11ac6ad
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 4 deletions.
9 changes: 9 additions & 0 deletions addons/account_edi_ubl_cii/wizard/account_move_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ def _get_wizard_values(self):
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
# -------------------------------------------------------------------------
Expand Down
9 changes: 9 additions & 0 deletions addons/account_peppol/wizard/account_move_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ def _get_wizard_values(self):
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
# -------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions addons/l10n_es_edi_facturae/wizard/account_move_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ def _get_wizard_vals_restrict_to(self, only_options):
# EXTENDS 'account'
values = super()._get_wizard_vals_restrict_to(only_options)
return {
**values,
'l10n_es_edi_facturae_checkbox_xml': False,
**only_options,
**values,
}

# -------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions addons/l10n_it_edi/wizard/account_move_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ def _get_wizard_vals_restrict_to(self, only_options):
# 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,
}

# -------------------------------------------------------------------------
Expand Down
9 changes: 9 additions & 0 deletions addons/snailmail_account/wizard/account_move_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ def _get_wizard_values(self):
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
# -------------------------------------------------------------------------
Expand Down

0 comments on commit 11ac6ad

Please sign in to comment.