[IMP] account_journal_restrict_mode: make field readonly to not allow editing in the view

This commit is contained in:
JordiMForgeFlow
2024-10-07 12:16:40 +02:00
parent aa745815a9
commit c51e1a5dfc

View File

@@ -8,7 +8,7 @@ from odoo.exceptions import UserError
class AccountJournal(models.Model):
_inherit = "account.journal"
restrict_mode_hash_table = fields.Boolean(default=True)
restrict_mode_hash_table = fields.Boolean(default=True, readonly=True)
@api.constrains("restrict_mode_hash_table")
def _check_journal_restrict_mode(self):