mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] Manage Nodes and Groups by Odoo version
This commit is contained in:
151
hotel_node_master/views/hotel_node.xml
Normal file
151
hotel_node_master/views/hotel_node.xml
Normal file
@@ -0,0 +1,151 @@
|
||||
<?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 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="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"/>
|
||||
<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': 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_open_dashboard" 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>
|
||||
|
||||
<!-- Action to open Hotel Nodes List -->
|
||||
<act_window id="hotel_node_action"
|
||||
name="List of Hotels"
|
||||
res_model="project.project"
|
||||
view_mode="tree,form"
|
||||
/>
|
||||
<!-- Action to open Hotel Users List -->
|
||||
<act_window id="hotel_node_user_action"
|
||||
name="List of Users in Hotels"
|
||||
res_model="hotel.node.user"
|
||||
view_mode="tree,form"
|
||||
/>
|
||||
<!-- Action to open Hotel Groups List -->
|
||||
<act_window id="hotel_node_group_action"
|
||||
name="List of Access Groups in Hotels"
|
||||
res_model="hotel.node.group"
|
||||
view_mode="tree,form"
|
||||
/>
|
||||
|
||||
<!-- Menu default to open Hotel Nodes Dashboard -->
|
||||
<menuitem id="hotel_node_dashboard_menu"
|
||||
name="Hotel Central Dashboard"
|
||||
action="hotel_node_action_open_dashboard"
|
||||
/>
|
||||
<!-- Menu Management Section -->
|
||||
<menuitem id="dashboard_menu"
|
||||
name="Management"
|
||||
parent="hotel_node_dashboard_menu"
|
||||
/>
|
||||
<!-- Menu item to open Hotel Nodes List -->
|
||||
<menuitem id="hotel_node_menu"
|
||||
name="Hotels"
|
||||
action="hotel_node_action"
|
||||
parent="dashboard_menu"
|
||||
sequence="1"
|
||||
/>
|
||||
<!-- Menu item to open Hotel Users List -->
|
||||
<menuitem id="hotel_node_user_menu"
|
||||
name="Users"
|
||||
action="hotel_node_user_action"
|
||||
parent="dashboard_menu"
|
||||
sequence="2"
|
||||
/>
|
||||
<!-- Menu item to open Hotel Users List -->
|
||||
<menuitem id="hotel_node_group_menu"
|
||||
name="Access Groups"
|
||||
action="hotel_node_group_action"
|
||||
parent="dashboard_menu"
|
||||
sequence="3"
|
||||
/>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user