1ab9455a9abce75ca2de9b208316acccf5a38dac
This commit slightly changes the embed detection for slides. Currently, we use the same URL to embed slide content within the e-learning module and when the end-user wants to embed that content on an external website. However, we want to know whether the slide is embedded externally or not to show different controls and update some statistics. The code previously relied on the presence of the "referer" header to achieve that detection, if the referer URL comes from a domain that is not this Odoo website -> then it's embedded externally. The issue with that strategy is that it's not very reliable, indeed some modern browsers now completely avoid passing the referer header (mostly for security and privacy reasons). Instead, we change this to let users embed on external websites with a *different* URL. When the embed comes from '/embed_external/', we now easily know that it comes from an external embed and don't have to do some further and potentially tricky processing. We introduced a computed 'embed_code_external' field that is computed the same way as the embed_code except for that small route distinction. This also easily solves any issue that could come with multi-website / different root URLs etc. Task-2654009 Part-of: odoo/odoo#77736
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%