The Odoo Web Library (OWL)
The Odoo V17 Javascript framework uses a custom component framework called OWL (short for Odoo Web Library). It is a declarative component system loosely inspired by Vue and React. 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 auto instantiation 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 with a 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 with hooks
- Understanding the OWL component life cycle
- Adding an OWL field to the form...