Daily updates from Odoo
Thursday, August 22, 2024
3 changes
2 changes
Resolved issues and error corrections
Users no longer see an error after leaving chat or WhatsApp discussion channels. The system now safely stops processing channel updates when the user's channel membership has already been removed, improving reliability during normal messaging use.
Original PR description
Issue --> Traceback appears after a user leaves a discuss channel of type `chat` or `whatsapp`. Cause --> `action_unfollow` unlinks the channel member from the `discuss.channel.member` table. When handling new message notification to show "_ has left the channel", method `channel_fetched` attempts to execute a query with an empty `discuss.channel.member` record, which raises a Postgres type mismatch error (`integer` vs ` boolean`) when setting `fetched_message_id`. Solution --> Check if the channel member exists, if not, then exit the method `channel_fetched`. opw-4069813
This change adjusts an internal performance test so it produces consistent results on the stable version. It helps reduce false failures in automated checks, supporting smoother maintenance without changing customer-facing behavior.
Original PR description
Method was refactored in master to get more consistent results. Stable can just get a temporary extra query. runbot-70182
1 change
Resolved issues and error corrections
This update changes automated tests to use Odoo's own time-freezing helper instead of an external decorator. It improves test cleanup and reduces the risk of unreliable test results, with no expected impact on end users.
Original PR description
As using freezegun.freeze_time decorator on test classes is discouraged, a custom freeze_time object can be used as a replacement that properly manage the cleanup. With this commit, the problematic usages are replaced by the custom object.