Friday, June 14, 2024
2 changes · saas-17.2
Enhancements to existing features
Portal dashboard cards now avoid repeated counting during a user session once related records are known to exist. This reduces page refresh work and flickering, making the customer portal feel faster and more stable.
Original PR description
The counters are primarily used as boolean to determine whether or not to display the card. Therefore, as soon as you have one record, we can show the card without needing to recheck it later. In the…
The counters are primarily used as boolean to determine whether or not to display the card. Therefore, as soon as you have one record, we can show the card without needing to recheck it later. In the worst-case scenario, you might see a card pointing to an empty list view. This approach helps us avoid recalculating whether there is a record for this card on each refresh. The approach is to cache the counter in the session as soon as there are more than 0 records. This way, if there are no invoices but a sale order is validated, the invoice counter will be recomputed, and you will see the invoice card the next time. For the duration of the same session, we won't recompute it and will always display the invoice card. We only re-request the computation if the counter in the session was 0 or if we need to show the counter, as in this case, we want to display the most precise number. This approach will also avoid flickering when the view is updated. Since we already know the count, we can display the card immediately without waiting for the RPC callback. To further reduce flickering, we have moved the spinner to the bottom, preventing the content from shifting upwards once the loader disappears. On another note, we've updated the policy for the parallel RPC requests made to /my/counter. Instead of splitting the counter into 3 RPC calls, we now allow 5 counters per RPC, with a maximum of three RPCs. An update of the view portal.portal_docs_entry is required to benefit from this cache for /my/counter,
Deferred reports can now be grouped by product or product category, giving finance teams clearer ways to analyze deferred revenue and expenses. The underlying deferral generation remains grouped by account, preserving existing accounting behavior while improving report visibility.
Original PR description
We now allow grouping by other fields that account_id in the report, namely product_id, and product_category_id. However, for the deferral generation, we continue grouping by account_id. task-id 3925943 https://github.com/odoo/enterprise/pull/62534