I expanded the hr.employee class. (Inherited and assigned a new name). I defined two views (tree and shape) and menu:
<record model="ir.ui.view" id="my_employee_tree">
<field name="name">hr.employee.tree</field>
<field name="model">hr.employee</field>
<field name="arch" type="xml">
...
</field>
</record>
<record id="view_my_hr_employee_form" model="ir.ui.view">
<field name="name">hr.employee.form</field>
<field name="model">hr.employee</field>
<field name="arch" type="xml">
...
</field>
</record>
<record model="ir.actions.act_window" id="action_my_hr_employee_seq">
<field name="name">Angajati</field>
<field name="res_model">hr.employee</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_my_hr_employee_form"/>
</record>
<menuitem id="menu_project_hr_base" parent="menu_project_utcn_project_base_main" name="HR"/>
<menuitem action="action_my_hr_employee_seq" id="menu_action_employee_form" name ="Angajati" parent="menu_project_hr_base"/>
What I want to do is get the original views from the hr.employee view when I use the original module, and get my specific views when using my module.
As you can see, I pointed out the "view_id" link to my form submission, but how can I define the link also to my tree view? And I want the view of the tree to be shown first, and as an alternative, the view of the form. How can I indicate this?
<field name="view_mode">tree,form</field>
doesn't seem to work if I add a link to the form view
source
share