Skip to content

Instantly share code, notes, and snippets.

@Guidoom
Created December 1, 2017 20:48
Show Gist options
  • Save Guidoom/acd898a163e1e496990cf9c0bfc82bdf to your computer and use it in GitHub Desktop.
Save Guidoom/acd898a163e1e496990cf9c0bfc82bdf to your computer and use it in GitHub Desktop.
views/degree_view.xml
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!--TREE VIEW-->
<record id="view_degree_tree" model="ir.ui.view">
<field name="name">pyth.dsple.degree.tree</field>
<field name="model">pyth.dsple.degree</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
</tree>
</field>
</record>
<!-- FORM VIEW -->
<record id="view_degree_form" model="ir.ui.view">
<field name="name">pyth.dsple.degree.form</field>
<field name="model">pyth.dsple.degree</field>
<field name="arch" type="xml">
<form string="Degree">
<sheet>
<label for="name"/>
<h1>
<field name="name"/>
</h1>
<notebook>
<page string="Disciples">
<field name="disciple_ids"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- ACTION -->
<record model="ir.actions.act_window" id="pyth_degree_action">
<field name="name">Degrees</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">pyth.dsple.degree</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create"><strong> Degrees</strong> list.
</p>
</field>
</record>
<!-- MENUES -->
<!-- Action disciple menu-->
<menuitem id="pyth_degree_submenu" name="Degrees"
action="pyth_degree_action"
parent="pyth_pythag_secondary_menu"/>
</data>
</odoo>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment