Description:
In this video, we will be discussing how to add new fields to a model. To explain the video, we will take the model vehicle rental and see how one can add a custom field to the model and display the same in the vehicle form view.
In this file, we’ll create our custom field to be added to the form view. It is very important that the field that needs to be added to the form view is present inside the form view.
In the .py file, we’ll inherit the model in which we are adding our custom field. In this case, we are adding a custom field to ‘vehicle.rental’ model in odoo.