From 8f38d1773bdc46dc39d4694427794f51fa4e0e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Duy=20=28=C4=90=E1=BB=97=20Anh=29?= Date: Mon, 13 Jan 2025 18:58:58 +0700 Subject: [PATCH] [IMP] base_cron_exclusion: replace _ to self.env._ when call to translate a string --- base_cron_exclusion/models/ir_cron.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base_cron_exclusion/models/ir_cron.py b/base_cron_exclusion/models/ir_cron.py index b950c5012fc..acba9b6330d 100644 --- a/base_cron_exclusion/models/ir_cron.py +++ b/base_cron_exclusion/models/ir_cron.py @@ -3,7 +3,7 @@ import logging -from odoo import _, api, fields, models +from odoo import api, fields, models from odoo.exceptions import ValidationError _logger = logging.getLogger(__name__) @@ -17,7 +17,7 @@ def _check_auto_exclusion(self): for item in self: if item in item.mutually_exclusive_cron_ids: raise ValidationError( - _( + self.env._( "You can not mutually exclude a scheduled actions with " "itself." )