Files
odoo_source/addons/im_livechat
tsm-odoo 7458484b07 [FIX] im_livechat: crash on new odoo instance
The live chat relies on `session.origin` to send its requests to
the server when its embed in an external page. `web.base.url` is
only set when a user authenticates and is wrong when no user
connected yet. Since `session.origin` uses the value of `web.base.url`,
a crash occurs when opening the website with live chat enabled on a
fresh instance of odoo. This commit removes the use of `session.origin`
in the frontend code since it is useless anyway. The `url` function
is used to format URLs since it either happens `session.origin` if
available or `location.origin` otherwise.

Steps to reproduce:
- Create a new odoo database with website_livechat installed
- Go to the log in page
- A crash occurs

closes odoo/odoo#140156

X-original-commit: 62e266e
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-10-31 10:33:54 +00:00
..
…