Files
pms/hotel_node_master/views/hotel_node.xml
2018-10-26 20:35:57 +02:00

127 lines
6.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="hotel_node_view_form" model="ir.ui.view">
<field name="name">hotel.node.view.form</field>
<field name="model">project.project</field>
<field name="arch" type="xml">
<form string="Hotel Node">
<sheet string="Hotel Node">
<div class="oe_button_box" name="button_box" groups="base.group_user">
<button name="%(hotel_node_reservation_wizard_action)d" type="action"
string="Reserve" help="Make a reservation in this hotel"
class="oe_stat_button" icon="fa-suitcase"
context="{'node_id': id}">
</button>
<button class="oe_stat_button" type="action"
name="" icon="fa-tasks">
<field string="Tasks" name="task_count" widget="statinfo" options="{'label_field': 'label_tasks'}"/>
</button>
<button name="action_sync_from_node" type="object" string="Synchronize"
attrs="{'invisible':[('id','=',False)]}"
confirm="Synchronizing a hotel node automatically updates Groups, Users, Room Types and Rooms in the Central Node. Do you want to proceed?"
class="oe_stat_button" icon="fa-cloud-download">
</button>
<button name="toggle_active" type="object"
confirm="(Un)archiving a hotel node automatically (un)archives its issues. Do you want to proceed?"
class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button"
options='{"terminology": "archive"}'/>
</button>
</div>
<div class="oe_title">
<h1>
<field name="name" placeholder="Hotel Name"/>
</h1>
<div name="options_active" class="oe_edit_only">
<div>
<label for="label_tasks" class="oe_inline" string="Name of the tasks :"/>
<field name="label_tasks" class="oe_inline oe_input_align"/>
</div>
</div>
</div>
<notebook>
<page name="remote_access" string="Remote Access">
<group name="remote_access" string="Hotel Node">
<group>
<field name="odoo_host" />
<field name="odoo_protocol" />
<field name="odoo_port" />
</group>
<group>
<field name="odoo_db" />
<field name="odoo_user" />
<field name="odoo_password" password="True" />
</group>
</group>
</page>
<page name="groups" string="Groups" attrs="{'invisible':[('id','=',False)]}">
<group>
<field name="odoo_version" readonly="1"/>
<!-- TODO Make group_ids readonly in hotel node form -->
<field name="group_ids" domain="[('odoo_version','=',odoo_version)]"/>
</group>
</page>
<page name="users" string="Users" attrs="{'invisible':[('id','=',False)]}">
<group>
<field name="user_ids" context="{'default_node_id': active_id}" />
</group>
</page>
<page name="room_type" string="Room Type" attrs="{'invisible':[('id','=',False)]}">
<group>
<field name="room_type_ids" context="{'default_node_id': active_id}" />
</group>
</page>
<page name="settings" string="Settings">
<group>
<field name="user_id" string="Node Manager"
attrs="{'readonly':[('active','=',False)]}"/>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"
help="Follow this node to automatically track the events associated to tasks and issues of this node."
groups="base.group_user"/>
</div>
</form>
</field>
</record>
<record id="hotel_node_view_tree" model="ir.ui.view">
<field name="name">hotel.node.view.tree</field>
<field name="model">project.project</field>
<field name="arch" type="xml">
<tree decoration-bf="message_needaction==True" decoration-muted="active == False" string="Hotels">
<field name="sequence" widget="handle"/>
<field name="message_needaction" invisible="1"/>
<field name="active" invisible="1"/>
<field name="name" string="Hotel Name"/>
<field name="odoo_host"/>
<field name="odoo_db"/>
<field name="odoo_version"/>
</tree>
</field>
</record>
<record id="hotel_node_action_kanban" model="ir.actions.act_window">
<field name="name">Hotels</field>
<field name="res_model">project.project</field>
<field name="view_type">form</field>
<field name="domain">[]</field>
<field name="view_mode">kanban,form</field>
<field name="target">main</field>
</record>
<menuitem id="hotel_node_menu"
name="Hotel Central Dashboard"
action="hotel_node_action_kanban"
/>
<menuitem id="hotel_node_menu_dashboard"
name="Management"
parent="hotel_node_menu"
/>
</odoo>