From c51e1a5dfc191b7425039e4342c791739d1cd27b Mon Sep 17 00:00:00 2001 From: JordiMForgeFlow Date: Mon, 7 Oct 2024 12:16:40 +0200 Subject: [PATCH] [IMP] account_journal_restrict_mode: make field readonly to not allow editing in the view --- account_journal_restrict_mode/models/account_journal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_journal_restrict_mode/models/account_journal.py b/account_journal_restrict_mode/models/account_journal.py index 921ac92b4..df5745415 100644 --- a/account_journal_restrict_mode/models/account_journal.py +++ b/account_journal_restrict_mode/models/account_journal.py @@ -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):