-
- Downloads
[FIX] gamification: prohibitive record rule processing with many users/goals
Due to the multi-company record rule on gamification.goal, each access to the Goals menu and each opening of the Messaging menu (thus calling get_serialised_gamification_summary()) is extremely slow (with several thousands goals/users). Adding auto_join to the user_id FK on goals makes it much faster. However it causes crashes when reading the table because the _order of gamification.goal uses `create_date`, which becomes ambiguous after the auto_join with res_users. Solving this can be done by re-implementing _read_flat() in the ORM using the internal Query object, as in search(), which takes care of fully-qualifying all column names. Until this is fixed, a simple workaround is to use start_date in the _order instead of collision-prone `create_date`.
Loading
Please register or sign in to comment