Skip to content

[FIX] deltatech_image_optimize: keep the cron enabled across upgrades - #2830

Merged
dhongu merged 1 commit into
19.0from
19.0-image-optimize-cron-noupdate
Aug 18, 2026
Merged

[FIX] deltatech_image_optimize: keep the cron enabled across upgrades#2830
dhongu merged 1 commit into
19.0from
19.0-image-optimize-cron-noupdate

Conversation

@dhongu

@dhongu dhongu commented Aug 18, 2026

Copy link
Copy Markdown
Owner

data/ir_cron.xml was missing noupdate="1". So every module upgrade
reapplied active = False
and switched the scheduled action back off —
silently, however long ago someone had enabled it.

Seen in production this morning: the cron was enabled yesterday, an upgrade
turned it off overnight, and nothing in the logs said so. It would simply not
have run, and the only way to notice is that the backlog stops shrinking.

data/ir_config_parameter.xml already carried the flag, which is why the tuned
parameters survived the same upgrade while the cron did not — the inconsistency
is what made this easy to miss.

Verification

On clean databases, both directions:

XML after install admin enables after upgrade
<odoo> (before) f t f — the bug
<odoo noupdate="1"> (after) f t t

And on the path that actually matters — a database installed with the old
version, then upgraded to this one:

step active ir_model_data.noupdate
installed (old version) f f
admin enables it t f
upgrade to this version t f
another upgrade t f

So existing databases are protected from this upgrade on, even though the
stored noupdate flag stays false — Odoo honours the flag from the file at
load time. It cannot, of course, re-enable a cron that an earlier upgrade
already switched off: check Scheduled Actions after upgrading.

A first attempt at this verification was contaminated — the noupdate flag
persisted in ir_model_data from an earlier run in the same database, so
removing it from the XML appeared to change nothing. Each case above is a fresh
database.

Version 19.0.1.8.019.0.1.8.1.

🤖 Generated with Claude Code

data/ir_cron.xml was not noupdate="1", so every module upgrade reapplied
active = False and switched the scheduled action back off, silently, however
long ago someone had enabled it.

Seen in production: the cron was enabled one day, an upgrade the next morning
turned it off again, and nothing in the logs said so - it simply stopped
running. ir_config_parameter.xml already had the flag, which is why the tuned
parameters survived the same upgrade while the cron did not.

Verified on clean databases: without the flag, enabled -> upgrade -> disabled;
with it, the cron stays enabled. Also verified on the real-world path (database
installed with the old version, then upgraded to this one): the cron survives
from this upgrade on, even though ir_model_data.noupdate stays false.
@dhongu
dhongu merged commit 0637297 into 19.0 Aug 18, 2026
5 checks passed
@dhongu
dhongu deleted the 19.0-image-optimize-cron-noupdate branch August 18, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant