Skip to content

Commit 1dce047

Browse files
committed
Remove unused import and change _ by self.env._
1 parent 286f848 commit 1dce047

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

account_journal_lock_date/models/account_move.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
33

44
from datetime import date
5-
from odoo import fields, models
5+
6+
from odoo import models
67
from odoo.exceptions import UserError
78
from odoo.tools.misc import format_date
89

account_journal_lock_date/wizards/update_journal_lock_dates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright 2020 Tecnativa - Ernesto Tejeda
22
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
33

4-
from odoo import SUPERUSER_ID, _, fields, models
4+
from odoo import SUPERUSER_ID, fields, models
55
from odoo.exceptions import UserError
66

77

@@ -16,7 +16,7 @@ def _check_execute_allowed(self):
1616
self.ensure_one()
1717
has_adviser_group = self.env.user.has_group("account.group_account_manager")
1818
if not (has_adviser_group or self.env.uid == SUPERUSER_ID):
19-
raise UserError(_("You are not allowed to execute this action."))
19+
raise UserError(self.env._("You are not allowed to execute this action."))
2020

2121
def action_update_lock_dates(self):
2222
self.ensure_one()

0 commit comments

Comments
 (0)