View Inheritance in Odoo 17 - Odoo 17 Slides

CelineGeorge1 914 views 13 slides Jul 12, 2024
Slide 1
Slide 1 of 13
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13

About This Presentation

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...


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