mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD] Shared Rooms
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
</group>
|
||||
<group colspan="2">
|
||||
<group name="room_ids_group">
|
||||
<field name="shared_room" />
|
||||
<field name="room_ids" widget="many2many_tags"/>
|
||||
<field name="total_rooms_count"/>
|
||||
</group>
|
||||
|
||||
@@ -19,7 +19,10 @@
|
||||
<div class="oe_title">
|
||||
<label for="name" string="Name" />
|
||||
<h1>
|
||||
<field name="name" />
|
||||
<field name="name"
|
||||
attrs="{'readonly':[('shared_room_id','!=', False)]}" />
|
||||
<field name="shared_room_id" string="Ubication"
|
||||
invisible='True' />
|
||||
</h1>
|
||||
<!-- <label for="to_be_cleaned" string="To be Cleaned" />
|
||||
<h2>
|
||||
@@ -29,12 +32,15 @@
|
||||
<notebook>
|
||||
<page name="information_hotel_room" string="Information">
|
||||
<group colspan="4" col="4">
|
||||
<field name="floor_id" string="Ubication" />
|
||||
<field name="floor_id" string="Ubication"
|
||||
attrs="{'readonly':[('shared_room_id','!=', False)]}" />
|
||||
<!-- <field name="categ_id" select="1" domain="[('isroomtype','=',True)]" string="Room Type" /> -->
|
||||
<field name="room_type_id" string="Room Type" />
|
||||
<field name="capacity" />
|
||||
<field name="shared_room" help="It allows several reservations on the same room simultaneously based on the capacity of people"/>
|
||||
<field name="extra_beds_allowed" />
|
||||
<field name="room_type_id" string="Room Type"
|
||||
attrs="{'readonly':[('shared_room_id','!=', False)]}"/>
|
||||
<field name="capacity"
|
||||
attrs="{'readonly':[('shared_room_id','!=', False)]}" />
|
||||
<field name="extra_beds_allowed"
|
||||
attrs="{'invisible':[('shared_room_id','!=', False)]}"/>
|
||||
<!-- <field name="uom_id" invisible="1" /> -->
|
||||
</group>
|
||||
<group>
|
||||
@@ -56,7 +62,7 @@
|
||||
</page>
|
||||
</notebook>
|
||||
<group>
|
||||
<field name="sequence" />
|
||||
<field name="sequence" attrs="{'readonly':[('shared_room_id','!=', False)]}"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
121
hotel/views/hotel_shared_room_views.xml
Normal file
121
hotel/views/hotel_shared_room_views.xml
Normal file
@@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- =================================================== Rooms =================================================== -->
|
||||
<!-- Form view of hotel room -->
|
||||
<record model="ir.ui.view" id="hotel_shared_room_view_form">
|
||||
<field name="name">hotel.shared.room.form</field>
|
||||
<field name="model">hotel.shared.room</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Hotel Shared Room">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="toggle_active" type="object"
|
||||
class="oe_stat_button" icon="fa-archive">
|
||||
<field name="active" widget="boolean_button"
|
||||
options='{"terminology": "archive"}'/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name" string="Name" />
|
||||
<h1>
|
||||
<field name="name" />
|
||||
</h1>
|
||||
</div>
|
||||
<notebook>
|
||||
<page name="information_hotel_shared_shared_room" string="Information">
|
||||
<group colspan="4" col="4">
|
||||
<field name="floor_id" string="Ubication" />
|
||||
<field name="room_type_id" string="Room Type" />
|
||||
<field name="beds" />
|
||||
<field name="sequence" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="bed_ids" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Descriptions">
|
||||
<group>
|
||||
<field name="description_sale" colspan="2" string="Name in reports"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Kanban view of hotel room -->
|
||||
<record model="ir.ui.view" id="hotel_shared_shared_room_view_kanban">
|
||||
<field name="name">hotel.shared.room.kanban</field>
|
||||
<field name="model">hotel.shared.room</field>
|
||||
<field name="type">kanban</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="o_kanban_mobile" >
|
||||
<attribute name="group_create">false</attribute>
|
||||
<field name="id"/>
|
||||
<field name="name"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_global_click">
|
||||
<div class="oe_kanban_details">
|
||||
<ul>
|
||||
<li class="mb4">
|
||||
<strong><field name="name"/></strong>
|
||||
</li>
|
||||
<li class="mb4">Room Type: <field name="room_type_id"/></li>
|
||||
<li class="badge mb4">
|
||||
<strong>Beds <field name="beds"/></strong>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Search view of hotel room -->
|
||||
<record model="ir.ui.view" id="hotel_shared_shared_room_view_search">
|
||||
<field name="name">hotel.shared.room.search</field>
|
||||
<field name="model">hotel.shared.room</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Hotel Shared Room">
|
||||
<field name="name" />
|
||||
<field name="room_type_id" />
|
||||
<field name="beds" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of hotel room -->
|
||||
<record model="ir.ui.view" id="hotel_shared_room_view_tree">
|
||||
<field name="name">hotel.shared.room.tree</field>
|
||||
<field name="model">hotel.shared.room</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Hotel Shared Room">
|
||||
<field name="name" />
|
||||
<field name="room_type_id" />
|
||||
<field name="beds" />
|
||||
<field name="sequence" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Action for hotel room -->
|
||||
<record model="ir.actions.act_window" id="action_hotel_shared_room_form">
|
||||
<field name="name">Hotel Shared Room</field>
|
||||
<field name="res_model">hotel.shared.room</field>
|
||||
<field name="view_type">form</field>
|
||||
<!-- <field name="context">{'default_isroom':1,'default_rental':1}
|
||||
</field> -->
|
||||
<field name="view_id" ref="hotel_shared_room_view_tree" />
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Shared Rooms" id="menu_open_hotel_shared_room_form" action="action_hotel_shared_room_form"
|
||||
sequence="5" parent="hotel.menu_hotel_room" />
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user