Bỏ qua để đến Nội dung
Sự kiện Odoo Experience 2025 bắt đầu vào 09:00:00, 18 thg 9, 2025 (Europe/Brussels)
How to write your website's custom JavaScript with Interactions
Developer
Địa điểm: Hall 11.A - 15:30, 18/09/2025 - 16:00, 18/09/2025 (Europe/Brussels) (30 phút)
How to write your website's custom JavaScript with Interactions
Robin Lejeune
Software Developer tại Odoo
Robin Lejeune
Software Developer tại Odoo
Robin has been working in the R&D Website Builder team since 2023. Between Odoo 18 and Odoo 19, he took part in developing Interactions as well as in refactoring the website builder.

As a developer, when you need to add functionalities to the frontend of your website, you might be tempted to include some global script running everywhere. What if I told you there is a better solution?

Interactions​ are the Odoo integrated way to inject dynamic code into your pages. They are a modernized and a more developer-friendly replacement of publicWidgets​, which experienced developers in Odoo already know. With Interactions​, you benefit from an actual lifecycle, with methods and a syntax closer to OWL. They start when needed and you do not have to worry about when to stop or restart them: the internals do it for you.

In this talk, I will present the code of a simple Interaction, step by step, to highlight the features and the expected way of thinking about it.