Skip to content

Commit

Permalink
Merge PR #3167 into 18.0
Browse files Browse the repository at this point in the history
Signed-off-by LoisRForgeFlow
  • Loading branch information
OCA-git-bot committed Jan 17, 2025
2 parents fccca90 + 8f38d17 commit 91cade0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions base_cron_exclusion/models/ir_cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand All @@ -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."
)
Expand Down Expand Up @@ -50,8 +50,7 @@ def _lock_mutually_exclusive_cron(db, job_id):
lock_cr.execute(
"""SELECT *
FROM ir_cron
WHERE numbercall != 0
AND active
WHERE active
AND id IN %s
FOR UPDATE NOWAIT""",
(locked_ids,),
Expand Down

0 comments on commit 91cade0

Please sign in to comment.