Skip to content

[19.0][FIX] mail_tracking: keep the search order for non-superusers - #272

Open
skanndar wants to merge 1 commit into
OCA:19.0from
skanndar:19.0-fix-mail_tracking-search-order
Open

skanndar wants to merge 1 commit into
OCA:19.0from
skanndar:19.0-fix-mail_tracking-search-order

Conversation

@skanndar

@skanndar skanndar commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

_get_allowed_ids() returns a set, so the access filter of MailTrackingEmail._search loses the order of the query: for non-superusers, the list is not sorted as requested.

Filter the ordered ids instead, as core's mail.message does. The test covers the list order and an ungrouped _read_group.

Assisted-by: Claude Opus 5.5

_get_allowed_ids() returns a set, so the access filter of _search lost the
order of the query: the list was not sorted as requested for anyone who is
not a superuser. Filter the ordered ids instead, as mail.message does.

Assisted-by: Claude Opus 5.5
@skanndar
skanndar force-pushed the 19.0-fix-mail_tracking-search-order branch from c9b2227 to ae7c65c Compare December 1, 2026 15:54
@skanndar

skanndar commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

@moylop260 This PR touches the same _search as #297 and is now rebased on top of it: it keeps the requested order for non-superusers. Could you take a look when you have time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants