diff options
| author | David Beguin <dbe@odoo.com> | 2018-12-06 08:36:53 +0000 |
|---|---|---|
| committer | David Beguin <dbe@odoo.com> | 2018-12-06 09:30:22 +0000 |
| commit | 3ca10b9692b9dae988fbe3c528b96814e3cb5cf3 (patch) | |
| tree | e72b3029769faa8b4d9060c4c6b32b2d09de23a2 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | f513ee902cd76079a54f0bfadc22bfaeda51cce5 (diff) | |
[IMP] im_livechat : optimize reports queries
Before, the duration and time to answer where computed based on the
mail channel creation date and
- the first message date from operator (for time to answer)
- the last message date (for duration)
But as the mail channel can be created long ago before the first message,
the result was not really representative.
Now, we are basing the computation only based on the messages.
Time to answer : first message date from operator - first message date
Duration : last message date - first message date
It allows, with the add of the second join on mail_message,
to simplify the extraction of those two indicator by removing the long
subselects.
Also, we fix the nbr_message in operator by adding the missing distinct.
Special mention to @jem-odoo who clearly did (almost) all the work :
This guy is amazing ! After a long and mature reflexion,
he finally put all his mighty power to enhance thoses reports
to give the users a wonderfull experience full of flowers and
peacefull sun, but also fast as a energized rabbit superhero !
Hail to him ! The One, the Only, the Chosen..
If you see him around the corner, please give him all your love
and gratitude ! VoilĂ voilĂ ..
Task ID : 1895998
Closes PR #28283
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
