Odoo is a customizable ERP software. In odoo we can do different customizations on functionalities or appearance. There are different view types in odoo like form, tree, kanban and search. It is also possible to change an existing view in odoo; it is called view inheritance. This slide will show how...
Odoo is a customizable ERP software. In odoo we can do different customizations on functionalities or appearance. There are different view types in odoo like form, tree, kanban and search. It is also possible to change an existing view in odoo; it is called view inheritance. This slide will show how to inherit an existing view in Odoo 17.
Size: 860.3 KB
Language: en
Added: Jul 12, 2024
Slides: 13 pages
Slide Content
View Inheritance in Odoo 17 Enterprise
Introduction Enterpr ise Odoo is a customizable ERP software. In odoo we can do different customizations on functionalities or appearance. There are different view types in odoo like form, tree, kanban and search. It is also possible to change an existing view in odoo; it is called view inheritance. This slide will show how to inherit an existing view in Odoo 17.
Enterprise View Inheritance By view inheritance we can modify a view by adding fields, buttons or attributes. If we add a new field to an existing view we have to inherit both model and view. Let's check an example.
Enterprise Add a New Field to an Existing View Here taking hr.employee model as an example. For that first inherit the model hr.employee and add a new field inside the model.
Enterprise Then inherit its corresponding form view. For that we want the external id of the view. To get the external id of the view activate developer mode then goto debug icon on the view then select Edit View: View Type instead of view type we can see the view type like form, kanban etc.
Enterprise
Enterprise When opening this we will get the view details and we can copy the external id from here. And also we can see all inherited views of this model under the tab Inherited Views.
Enterprise
Enterprise By using the external id we can inherit the form view of hr.employee. We can assign the external id as the inherit_id of the form. Then xpath the field. That means we can give the correct path for the field where it should be added.
Enterprise
Enterprise After upgrading the module the new field will be added to the employee form
Enterprise This way we can add buttons and attributes to the inherited view. And we can follow the same steps to inherit other views like list, kanban, etc.
For More Info. Check our company website for related blogs and Odoo book. Check our YouTube channel for functional and technical videos in Odoo. Enterprise www.cybrosys.com