[19.0][MIG] web_notify_upgrade: Migration to 19.0#3441
[19.0][MIG] web_notify_upgrade: Migration to 19.0#3441AnmollGarg wants to merge 11 commits intoOCA:19.0from
Conversation
alexey-pelykh
left a comment
There was a problem hiding this comment.
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_TIMERThis 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 version — web_notify_upgrade.pot header says Odoo Server 18.0, should be 19.0.
Redundant bus dependency — web_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.
|
@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! |
d7df3a7 to
5822085
Compare
|
Followed the Technical Method by OCA. |
Migration of web_notify_upgrade to Odoo 19.0.
Depends on: