Custom module, object with a tree and a form view linked on menu.
<odoo>
<record id = "adm_sessions_tree_view" model = "ir.ui.view">
<field name = "name">adm.session.tree</field>
<field name = "model">pos.adm</field>
<field name = "arch" type = "xml">
<tree string = "Session Adm" create = 'false'>
<field name = "day_local"/>
<field name = "pos_ref"/>
<field name = "day_static"/>
<field name = "day_margin"/>
<field name = "day_sold"/>
<field name = "day_costs"/>
<field name = "month_margin"/>
<field name = "month_sold"/>
<field name = "month_costs"/>
<field name = "avg_minutes"/>
</tree>
</field>
</record>
<record id = "adm_sessions_form_view" model = "ir.ui.view">
<field name = "name">adm.session.form</field>
<field name = "model">pos.adm</field>
<field name = "arch" type = "xml">
<form>
<sheet>
<group colspan='4'>
<field name = "day_local"/>
<field name = "pos_ref"/>
<field name = "day_static"/>
<field name = "day_margin"/>
<field name = "day_sold"/>
<field name = "day_costs"/>
<field name = "month_margin"/>
<field name = "month_sold"/>
<field name = "month_costs"/>
<field name = "avg_minutes"/>
</group>
</sheet>
</form>
</field>
</record>
<record id = "adm_sessions_tree_view2" model = "ir.actions.act_window">
<field name = "name">AdM sessions</field>
<field name = "type">ir.actions.act_window</field>
<field name = "res_model">pos.adm</field>
<field name = "view_type">form</field>
<field name = "view_mode">tree, form</field>
<field name = "view_id" ref= "adm_sessions_form_view"/>
</record>
<record id = "adm_sessions_tree_view3" model = "ir.actions.act_window">
<field name = "name">AdM sessions</field>
<field name = "type">ir.actions.act_window</field>
<field name = "res_model">pos.adm</field>
<field name = "view_type">form</field>
<field name = "view_mode">tree, form</field>
<field name = "view_id" eval="False"/>
</record>
<menuitem
action = "adm_sessions_tree_view2"
id = "adm_session_menu"
parent = "pos_divina_custom.menu_point_of_sale2"
name = "Adm Sessions"
sequence= "12"/>
</odoo>
Tree view is correctly loaded and linked to my menu but clicking on record doesn't open the respective form.
I don't need to edit the form, but just show all the other fields (even if now are the same shown on tree).
What are the missing bits?
How to create Form and Tree view in Odoo: http://learnopenerp.blogspot.com/2016/09/how-to-create-form-and-tree-view-in-odoo.html