Skip to content

Commit

Permalink
Merge PR #2899 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by StefanRijnhart
  • Loading branch information
OCA-git-bot committed Apr 5, 2024
2 parents 3c580f7 + 0dc32c1 commit a3c4fc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cron_daylight_saving_time_resistant/models/ir_cron.py
Expand Up @@ -45,7 +45,7 @@ def _process_job(cls, db, cron_cr, job):
# be 1 hour too soon) and the date will just be incremented of 1
# hour, each hour...until the changes time really occurs...
if job["daylight_saving_time_resistant"]:
with cls.pool.cursor() as job_cr:
with db.cursor() as job_cr:
try:
cron = api.Environment(
job_cr,
Expand Down
5 changes: 5 additions & 0 deletions cron_daylight_saving_time_resistant/tests/test_dst.py
Expand Up @@ -29,6 +29,11 @@ def _check_cron_date_after_run(self, cron, datetime_str):
{"nextcall": datetime_str, "daylight_saving_time_resistant": True}
)
cron.flush_recordset()
cron.ir_actions_server_id.flush_recordset(
fnames=[
"model_name",
],
)
self.env.cr.execute("SELECT * FROM ir_cron WHERE id = %s", (cron.id,))
job = self.env.cr.dictfetchall()[0]
timezone_date_orig = fields.Datetime.context_timestamp(cron, cron.nextcall)
Expand Down

0 comments on commit a3c4fc0

Please sign in to comment.