| 1 | from odoo import _, models |
| 2 | |
| 3 | |
| 4 | class AccountMoveSendWizard(models.TransientModel): |
| 5 | _inherit = 'account.move.send.wizard' |
| 6 | |
| 7 | def _compute_extra_edi_checkboxes(self): |
| 8 | super()._compute_extra_edi_checkboxes() |
| 9 | for wizard in self: |
| 10 | checkboxes = wizard.extra_edi_checkboxes or {} |
| 11 | if 'ro_edi' not in checkboxes and wizard.move_id.l10n_ro_edi_state == 'invoice_sent': |
| 12 | readonly_checkbox = {'ro_spv': {'checked': False, 'readonly': True, 'label': _("Send E-Factura to SPV"), 'question_circle': _("You can't send now. Invoice is waiting for an answer.")}} |
| 13 | wizard.extra_edi_checkboxes = {**checkboxes, **readonly_checkbox} |