Monday, June 3, 2024
2 changes · saas-17.1
Resolved issues and error corrections
This fixes an issue where leaving a Discuss channel could trigger an unnecessary request to reload information for the channel just left. The change makes the leave action cleaner and avoids wasted background activity, improving reliability without changing the user workflow.
Original PR description
When a channel is left, a `discuss.channel/new_message` and a `discuss.channel/leave` notifications are received from the bus in the same batch. Before [1], we checked if a `discuss.channel/leave` notification was received as part of the same batch and we ignore the `discuss.channel/new_message` one if it was the case. After [1], the check is not done anymore which results in fetching the channel infos of the channel that was just left. This PR adapts the code to only remove the channel member of the current user instead of deleting the whole channel. This prevents the channel info request since it is already known. Steps to reproduce the issue: - Go to the discuss app - Join a channel - Leave the channel - Notice that à call to `/discuss/channel/info` was done for the channel that was left. [1]: https://github.com/odoo/odoo/pull/147747
This update keeps accounting reports compatible with newer Ubuntu system packages. It prevents report export and formatting issues caused by changes in underlying image and spreadsheet libraries, helping ensure stable report generation after platform upgrades.
Original PR description
[FIX] account_reports: adapt pil usage for ubuntu noble
The `getsize` method on a FreeTypeFont object was deprecated [0] in Pillow
9.2.0. Ubuntu Noble provides Pillow 10.2.0. They advise to use `getbbox`
which is already available in Pillow 9.0.1 provided by Ubuntu Jammy.
See: https://pillow.readthedocs.io/en/stable/releasenotes/9.2.0.html#font-size-and-offset-methods
[FIX] account_report: adapt xlsxwriter usage for ubuntu noble
The `col_sizes` attribute on an worksheet was removed in xlsxwriter
version 3.0.6 [0]. Ubuntu Noble provides xlsxwriter 3.1.9.
The xlsxwriter author advises [1] to use the `col_info` attribute
instead, but this attribute appeared in 3.0.6 too (rename of `colinfo`).
With this commit, the version is checked in order to use the right
attribute.
See: jmcnamara/XlsxWriter@860f4a2404549aca1eccf9bf8361df95dc574f44
and jmcnamara/XlsxWriter#937