Skip to content

[19.0][MIG] web_notify_upgrade: Migration to 19.0#3441

Open
AnmollGarg wants to merge 11 commits intoOCA:19.0from
AnmollGarg:19.0-mig-web_notify_upgrade
Open

[19.0][MIG] web_notify_upgrade: Migration to 19.0#3441
AnmollGarg wants to merge 11 commits intoOCA:19.0from
AnmollGarg:19.0-mig-web_notify_upgrade

Conversation

@AnmollGarg
Copy link

@AnmollGarg AnmollGarg commented Feb 19, 2026

Migration of web_notify_upgrade to Odoo 19.0.

Depends on:

@AnmollGarg AnmollGarg mentioned this pull request Feb 19, 2026
44 tasks
Copy link
Contributor

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the migration, @AnmollGarg!

The shift from raw SQL on bus_presence to ORM search on mail.presence with the status field is the right approach for 19.0. The env._() translation calls are also correct. Nice touch adding the DND (manual_im_status != "busy") filtering.

A few observations:

Hardcoded presence constants (ir_model.py lines 9-12) — The constants UPDATE_PRESENCE_DELAY, DISCONNECTION_TIMER, AWAY_TIMER, and PRESENCE_OUTDATED_TIMER are copy-pasted from odoo.addons.mail.models.mail_presence (the commented-out import hints at this). Since the module already depends on mail (transitively through web_notify), these could be imported directly:

from odoo.addons.mail.models.mail_presence import AWAY_TIMER, DISCONNECTION_TIMER

This avoids value drift if upstream changes these timers. That said, looking at _get_active_users_to_notify_of_upgrade, the method doesn't actually use any of these constants — it relies on the status field computed by mail.presence itself. So the constants can simply be removed entirely.

POT file versionweb_notify_upgrade.pot header says Odoo Server 18.0, should be 19.0.

Redundant bus dependencyweb_notify already pulls in bus, so listing it in depends is not necessary. Not blocking, just a note.

CI: tests pass (with OCB and Odoo). The "Detect unreleased dependencies" failure is expected given the dependency on #3377 which is still open.

Overall looks good — the core migration logic is sound.

@AnmollGarg
Copy link
Author

@alexey-pelykh I've pushed the fixes!

Removed the redundant bus dependency.

Updated the POT file header to 19.0.

Removed the unused constants from ir_model.py.

Ready for another look!

@AnmollGarg AnmollGarg force-pushed the 19.0-mig-web_notify_upgrade branch from d7df3a7 to 5822085 Compare March 9, 2026 07:44
@AnmollGarg
Copy link
Author

Followed the Technical Method by OCA.

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.

5 participants