by Muhammad Kamran
In Odoo ERP, FormView is a user interface view
that allows users to interact with a single record of a model. Creating a
add your custom functionality.
Creation of Custom FormView Widget in Odoo
Here's a step-by-step guide on how to create a widget for a FormView in Odoo:
3. Create a QWeb template for the widget
In the above
QWeb template, replace
the name of the field for which you want to use the custom
4. Define your custom field in a model view
Finally, in your module's views,
define your custom
field using the newly created
widget. In this example, we are using a Field.Char type
Replace your.model.name with the name of the model that contains the field for which you want to use the custom widget, and your_char_field with the actual name of the field.
Remember to replace your_module_name with the actual name of your module.
After following these steps, your custom widget
should be applied
to the specified field in
the FormView of the specified model, and the custom functionality you defined