Tuesday, May 13, 2025
1 change · saas-18.2
Enhancements to existing features
The Appointment app’s default kanban view now opens much faster for non-admin users by making the underlying data checks more efficient. This reduces waiting time significantly, improving day-to-day usability for teams managing appointments.
Original PR description
Description ------------ For non-admin users, loading the default kanban view of the Appointment application triggers the compute method `_compute_appointment_counts`. This is quite slow as it calls an override of `_read_group`, which adds an elaborate domain for privacy in `_get_default_privacy_domain`. This patch optimizes domains to generate more efficient queries by: - Simplifying useless sub-queries of the form `fkey in (select id from comodel where id = X)` to `fkey in (X)` where it makes sense (in `sudo` context) - Adding supporting indexes Benchmark ---------- On odoo.com, the time for a regular user to open the default kanban view of appointments is: | Before (hot) | After (hot) | Speedup | |--------------|-------------|---------| | 11s | 1.2s | 9.2x | Reference --------- task-4744275 Community PR: https://github.com/odoo/odoo/pull/207015