Odoo periodically updates the user online status. This is
done every minute and is throttled in order to ensure it won't
be triggered more than it should.
Since [1], the underscore `throttle` function has been replaced
by the `throttleForAnimation` function. This is not equivalent:
the function won't be triggered if there is no animation which
result in an outdated user status.
This issue was highlighted by the live chat: the button does
not show up when there is no available operator.
Steps to reproduce the issue:
- Log in on Odoo with live chat installed
- Go to a web page that uses the live chat widget
- Wait more that one minute and refresh the page
- The live chat button is not shown anymore: the only
operator is considered as disconnected.
This PR fixes that issue by re-introducing the underscore
throttle function: it is robust and can be needed, not all
throttles are linked to animations.
[1]: https://github.com/odoo/odoo/pull/120437.
opw-3578517
closesodoo/odoo#142160
X-original-commit: f64a7cbad3dee3ffc365b931306b1c13c8bff536
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>