[FIX] cron_daylight_saving_time_resistant: Keep test savepoint
parent
3c580f772a
commit
0dc32c1f03
|
@ -45,7 +45,7 @@ class IrCron(models.Model):
|
||||||
# be 1 hour too soon) and the date will just be incremented of 1
|
# be 1 hour too soon) and the date will just be incremented of 1
|
||||||
# hour, each hour...until the changes time really occurs...
|
# hour, each hour...until the changes time really occurs...
|
||||||
if job["daylight_saving_time_resistant"]:
|
if job["daylight_saving_time_resistant"]:
|
||||||
with cls.pool.cursor() as job_cr:
|
with db.cursor() as job_cr:
|
||||||
try:
|
try:
|
||||||
cron = api.Environment(
|
cron = api.Environment(
|
||||||
job_cr,
|
job_cr,
|
||||||
|
|
|
@ -29,6 +29,11 @@ class TestDST(TransactionCase):
|
||||||
{"nextcall": datetime_str, "daylight_saving_time_resistant": True}
|
{"nextcall": datetime_str, "daylight_saving_time_resistant": True}
|
||||||
)
|
)
|
||||||
cron.flush_recordset()
|
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,))
|
self.env.cr.execute("SELECT * FROM ir_cron WHERE id = %s", (cron.id,))
|
||||||
job = self.env.cr.dictfetchall()[0]
|
job = self.env.cr.dictfetchall()[0]
|
||||||
timezone_date_orig = fields.Datetime.context_timestamp(cron, cron.nextcall)
|
timezone_date_orig = fields.Datetime.context_timestamp(cron, cron.nextcall)
|
||||||
|
|
Loading…
Reference in New Issue