Skip to content

Instantly share code, notes, and snippets.

@sehrishnaz
Created September 10, 2020 10:11
Show Gist options
  • Save sehrishnaz/9b81b0b72eb7cd44cd5d20b44629856f to your computer and use it in GitHub Desktop.
Save sehrishnaz/9b81b0b72eb7cd44cd5d20b44629856f to your computer and use it in GitHub Desktop.
How to Create Form and Tree View in Odoo13
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record model="ir.ui.view" id="view_lo_student_info_form">
<field name="name">lo.student.info.form</field>
<field name="model">lo.student.info</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form>
<sheet>
<group colspan="4" col="4">
<field name="name" />
<field name="age" />
<field name="gender" />
<field name="student_dob" />
<field name="marks" />
</group>
<notebook>
<page string="Address">
<field name="address" />
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_lo_student_info_tree">
<field name="name">lo.student.info.tree</field>
<field name="model">lo.student.info</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree>
<field name="name" />
<field name="age" />
<field name="gender" />
<field name="student_dob" />
<field name="marks" />
</tree>
</field>
</record>
</data>
</odoo>
@sehrishnaz
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment