Debian Codegraph @

addons/l10n_rs_edi/wizard/account_move_send_wizard.py

raw
1 from odoo import api, models
2
3
4 class AccountMoveSendWizard(models.TransientModel):
5 _inherit = 'account.move.send.wizard'
6
7 @api.onchange('extra_edi_checkboxes')
8 def _onchange_extra_edi_checkboxes(self):
9 checkboxes = self.extra_edi_checkboxes or {}
10 if 'rs_edi' in checkboxes:
11 if checkboxes['rs_edi']['checked']:
12 checkboxes['rs_cir_checkbox']['readonly'] = False
13 else:
14 checkboxes['rs_cir_checkbox']['checked'] = False
15 checkboxes['rs_cir_checkbox']['readonly'] = True
16 self.extra_edi_checkboxes = {**checkboxes}