Chapter 16: The Odoo Web Library (OWL)
Odoo v14 introduced a new JavaScript framework called OWL (short for Odoo Web Library). OWL is a component-based UI framework and uses QWeb templates for structure. OWL is very fast compared to Odoo's legacy widget system and introduces tons of new features, including hooks, reactivity, the autoinstantiation of subcomponents, and more besides. In this chapter, we will learn how to use an OWL component to generate interactive UI elements. We will start from the minimal OWL component and then we will learn about the component's life cycle. Finally, we will create a new field widget for the form view. In this chapter, we will cover the following recipes:
- Creating an OWL component
- Managing user actions in an OWL component
- Making OWL components reactive
- Understanding the OWL component life cycle
- Adding an OWL field to the form view
Note
The following question may occur to you: Why is Odoo not using some well-known JavaScript...