Monday, April 24, 2023
2 changes · master
Resolved issues and error corrections
Clicking a reply backlink from the starred mailbox now either takes users to the original open conversation or shows a clear warning when it cannot. This prevents confusing dead clicks and helps users follow message context more reliably.
Original PR description
**Current behavior before PR:** Nothing happens when you click on the message backlink in the starred mailbox. **Desired behavior after PR is merged:** If the origin channel is open then the user will be redirected or a warning notification will be displayed. Task-2939118 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change fixes issues that could cause errors or warning notifications when users grouped records in list or reporting views. It improves reliability for grouped calendar views and other reports that group by the same linked field more than once.
Original PR description
### [FIX] core: read_group same relational grouping Before 916c9c4, we could groupby several times on the same relational fields for a `read_group` call. Example: `read_group([], [...],…
### [FIX] core: read_group same relational grouping
Before 916c9c4, we could
groupby several times on the same relational fields for a
`read_group` call. Example:
`read_group([], [...], groupby=['product_id', 'product_id'], ...)`.
Now, it produces a traceback:
File "/data/build/odoo/odoo/models.py", line 2583, in read_group
self._read_group_format_result(rows_dict, lazy_groupby)
File "/data/build/odoo/odoo/models.py", line 2396, in _read_group_format_result
ids = [row[group].id for row in rows_dict if row[group]]
File "/data/build/odoo/odoo/models.py", line 2396, in <listcomp>
ids = [row[group].id for row in rows_dict if row[group]]
AttributeError: 'tuple' object has no attribute 'id'
It is because `_read_group_format_result` try to convert the record
into tuple (id, display_name) twice (one for each groupby).
Fix this issue introduced by the refactor of `_read_group`.
### [FIX] calendar: groupby on calendar.event triggers 'danger' notification
The `read_group` of `calendar.event` sends a danger notification when
the user groups by any field in the list view. It is because the
security reenforcement done in 2c0b3ab
is too strict. It checks all `fields`, even the ones that are filtered
out by the `read_group` (`fields` without aggregation specification
nor `group_operator`).