As you saw in Chapter 10, Backend Views, we can use widgets to display certain data in different formats. For example, we used widget='image' to display a binary field as an image. To demonstrate how to create your own widget, we'll write one widget that lets the user choose an integer field, but we will display it differently. Instead of an input box, we will display a color picker, so that we can select a color number.
Creating custom widgets
Getting ready
For this recipe, we will be using the my_library module from Chapter 4, Creating Odoo Add-On Modules. In this recipe, we are going to add a new field widget that needs dependency of the web module. Make sure that you have added the dependency onweb in the...