O'Reilly logo

Odoo Development Essentials by Daniel Reis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extending views

Forms, lists, and search views are defined using the arch XML structures. To extend views we need a way to modify this XML. This means locating XML elements and then introducing modifications on those points.

Inherited views allow just that. An inherited view looks like this:

<record id="view_form_todo_task_inherited" model="ir.ui.view">
  <field name="name">Todo Task form – User extension</field>
  <field name="model">todo.task</field>
  <field name="inherit_id" ref="todo_app.view_form_todo_task"/>
  <field name="arch" type="xml">
      <!-- ...match and extend elements here! ... -->
  </field
</record>

The inherit_id field identifies the view to be extended, by referring to its external identifier using the special ref attribute. External identifiers ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required