Created
January 18, 2018 09:56
-
-
Save sykp241095/b1de11b94836de930b7f677ffcf34585 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<odoo> | |
<data> | |
<!-- XXX Course --> | |
<record model="ir.ui.view" id="course_form_view"> | |
<field name="name">course.form</field> | |
<field name="model">openacademy.course</field> | |
<field name="arch" type="xml"> | |
<form string="Course Form"> | |
<sheet> | |
<group> | |
<field name="name"/> | |
<field name="responsible_id"/> | |
</group> | |
<notebook> | |
<page string="Description"> | |
<field name="description"/> | |
</page> | |
<page string="Sessions"> | |
<field name="session_ids"> | |
<tree string="Registered sessions"> | |
<field name="name"/> | |
<field name="instructor_id"/> | |
</tree> | |
</field> | |
</page> | |
</notebook> | |
</sheet> | |
</form> | |
</field> | |
</record> | |
<record model="ir.ui.view" id="course_search_view"> | |
<field name="name">course.search</field> | |
<field name="model">openacademy.course</field> | |
<field name="arch" type="xml"> | |
<search> | |
<field name="name"/> | |
<field name="description"/> | |
</search> | |
</field> | |
</record> | |
<!-- override the automatically generated list view for courses --> | |
<record model="ir.ui.view" id="course_tree_view"> | |
<field name="name">course.tree</field> | |
<field name="model">openacademy.course</field> | |
<field name="arch" type="xml"> | |
<tree string="Course Tree"> | |
<field name="name"/> | |
<field name="responsible_id"/> | |
</tree> | |
</field> | |
</record> | |
<!-- window action --> | |
<!-- The following tag is an action definition for a "window action", that is an action opening a view or a set of views --> | |
<record model="ir.actions.act_window" id="course_list_action"> | |
<field name="name">Courses</field> | |
<field name="res_model">openacademy.course</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">Create the first course | |
</p> | |
</field> | |
</record> | |
<!-- top level menu: no parent --> | |
<menuitem id="main_openacademy_menu" name="Open Academy"/> | |
<!-- A first level in the left side menu is needed before using action= attribute --> | |
<menuitem id="openacademy_menu" name="Open Academy" parent="main_openacademy_menu"/> | |
<!-- the following menuitem should appear *after* its parent openacademy_menu and *after* its action course_list_action --> | |
<menuitem id="courses_menu" name="Courses" parent="openacademy_menu" action="course_list_action"/> | |
<!-- Full id location: action="openacademy.course_list_action" It is not required when it is the same module --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment