Skip to content

Latest commit

 

History

History
 
 

05-view-inheritance

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

View Inheritance

Goal

Odoo provides an inheritance mechanism to extend a view in a modular way. The view extension describes modifications of the XML of the extended view. It can, for instance, add elements, modify elements or modify element attributes. It usually complements model extensions.

The purpose of this module is to learn this inheritance mechanism.

Requirements

Problem 1: Instructors (OpenAcademy)

In the previous training module (Model Inheritance), we have added fields on the contacts (model res.partner). The boolean field instructor distinguishes between instructors and other contacts, and a read- only field shows the sessions attended by a given contact. Make these fields appear on the form and search views of this model with view inheritance.

  • Hint: the form view to inherit from has the id base.view_partner_form.

Problem 2: Library Management

In the previous training module, we added a specific data model for book copies. Modify the form view of that model to make it inherit from the form view of the book model.

Resources

Reference

Code Sample