Creating JavaScript classes and widgets in Odoo

< / / / / / >
Framework JavaScript
V 14.0
+/- 31 minutes
Written by Géry Debongnie

Quick scroll

1. Introduction

This tutorial will teach you the fundamentals of the two basic building blocks provided by the Odoo framework: classes and widgets.

This is a large topic, and a tutorial such as this one is not enough to cover it properly. To make the most of these topics we'll do a few tasks that explain the most important parts. We will complete the following task: make a quiz application, in which the user will be able to select a topic, answer a few multiple choices questions and then get a score.

In this tutorial you will learn how to create your own JavaScript classes, your own widgets, how to use them and add the end a detailed explanation about how communication between widgets works.

Tip: this tutorial is rather long and covers multiple subjects. Take your time to finish it or even plan a break in between. If the tutorial gets confusing - as there is a lot of code - you can download the example app for easier understanding of the structure.

This tutorial is exclusive for premium members
Become a member too and read all tutorials, unlimited.

Already a member? login here.