diff --git a/account_lock_to_date/__manifest__.py b/account_lock_to_date/__manifest__.py index b33ef4476..7c1ba7a3b 100644 --- a/account_lock_to_date/__manifest__.py +++ b/account_lock_to_date/__manifest__.py @@ -5,7 +5,7 @@ "name": "Account Lock To Date", "summary": """ Allows to set an account lock date in the future.""", - "version": "13.0.1.0.0", + "version": "13.0.1.0.1", "license": "AGPL-3", "author": "ForgeFlow, Odoo Community Association (OCA)", "website": "https://github.com/OCA/account-financial-tools", diff --git a/account_lock_to_date/i18n/account_lock_to_date.pot b/account_lock_to_date/i18n/account_lock_to_date.pot index f7896a9ce..7a9c334ae 100644 --- a/account_lock_to_date/i18n/account_lock_to_date.pot +++ b/account_lock_to_date/i18n/account_lock_to_date.pot @@ -181,5 +181,5 @@ msgstr "" #, python-format msgid "" "You cannot lock a period that is not finished yet. Please make sure that the" -" lock date for advisors is not set after the last day of the previous month." +" lock date for advisors is set at or after the last day of the next month." msgstr "" diff --git a/account_lock_to_date/wizards/account_update_lock_to_date.py b/account_lock_to_date/wizards/account_update_lock_to_date.py index 4e0cb063d..4f89c3802 100644 --- a/account_lock_to_date/wizards/account_update_lock_to_date.py +++ b/account_lock_to_date/wizards/account_update_lock_to_date.py @@ -1,8 +1,8 @@ # Copyright 2019 ForgeFlow S.L. -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import SUPERUSER_ID, _, api, fields, models -from odoo.exceptions import UserError +from odoo.exceptions import ValidationError class AccountUpdateLockToDate(models.TransientModel): @@ -45,7 +45,7 @@ class AccountUpdateLockToDate(models.TransientModel): self.ensure_one() has_adviser_group = self.env.user.has_group("account.group_account_manager") if not (has_adviser_group or self.env.uid == SUPERUSER_ID): - raise UserError(_("You are not allowed to execute this action.")) + raise ValidationError(_("You are not allowed to execute this action.")) def execute(self): self.ensure_one()