<?xml version="1.0" encoding="UTF-8" ?> <odoo> <record id="xbus_message_view_tree" model="ir.ui.view"> <field name="name">xbus_message_view_tree</field> <field name="model">xbus.message</field> <field name="arch" type="xml"> <tree> <field name="envelope_id" /> <field name="type" /> <field name="uid" /> </tree> </field> </record> <record id="xbus_message_view_form" model="ir.ui.view"> <field name="name">xbus_message_view_form</field> <field name="model">xbus.message</field> <field name="arch" type="xml"> <form string="Xbus Message"> <sheet> <group> <field name="envelope_id" /> <field name="type" /> <field name="uid" /> </group> <group> <!-- The header field is hidden if its conversion to json works --> <field name="header" string="Header" attrs="{'invisible':[('header_json', '!=', False)]}" /> <!-- header_json field is only visible if the conversion of the header field to json works --> <field name="header_json" string="Header" attrs="{'invisible':[('header_json', '=', False)]}" /> <!-- The body field is hidden if its conversion to json works --> <field name="body" string="Body" attrs="{'invisible':[('body_json', '!=', False)]}" /> <!-- body_json field is only visible if the conversion of the body field to json works --> <field name="body_json" string="Body" attrs="{'invisible':[('body_json', '=', False)]}" /> </group> <group> <field name="link_ids" attrs="{'invisible': [('link_ids', '=', False)]}" > <tree> <button name="action_open_document" string="Open Document" type="object" icon="fa-file-text-o" attrs="{'invisible': ['|', ('res_model', '=', False), ('res_id', '=', 0)]}" /> <field name="res_model" /> <field name="res_id" /> </tree> </field> </group> </sheet> </form> </field> </record> <record id="xbus_message_action" model="ir.actions.act_window"> <field name="name">Xbus Messages</field> <field name="res_model">xbus.message</field> <field name="view_mode">tree,form</field> </record> <menuitem id="xbus_message_menuitem" name="Messages" parent="menu_xbus_common" action="xbus_message_action" sequence="2" groups="group_xbus_reader" /> </odoo>