diff --git a/README.md b/README.md
index e9f1d8f..f48eed9 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,30 @@
-[![Build Status](https://travis-ci.org/JayVora-SerpentCS/OdooHotelManagementSystem.svg?branch=10.0)](https://travis-ci.org/JayVora-SerpentCS/OdooHotelManagementSystem)
+[![Build Status](https://travis-ci.org/OCA/vertical-hotel.svg?branch=10.0)](https://travis-ci.org/OCA/vertical-hotel)
+[![Coverage Status](https://coveralls.io/repos/OCA/vertical-hotel/badge.png?branch=10.0)](https://coveralls.io/r/OCA/vertical-hotel?branch=10.0)
-OpenERP/Odoo Hotel Management System
-====================================
+# Vertical Hotel
-Serpent Consulting services Pvt. Ltd. provide an efficient OpenERP/ODOO Hotel Management Software which includes front office management systems for all sorts of hotel operations and encompasses a comprehensive line of OpenERP solutions for many other aspects of hotel operations including CRS (Central Reservation System), CRM, Spa Scheduling and Management, POS Hotel Management Software as well as real-time hotel booking engine.
+write me
-“Our OpenERP HMS is capable of ensuring constant control over all of the activities and processes of your hotel”
-
+[//]: # (addons)
-Choosing our integrated OpenERP/ODOO Hotel Management Software optimizes your hotel’s costs whilst improving your overall productivity. Furthermore, our OpenERP/Odoo software solutions are equipped with tools that aid you to carry out scrupulous checks any sort of expenses made by the hotel. With this the management can easily detect and eliminate any additional waste cost expenses. We have integrated these solutions seamlessly with our PMS and thus, these are capable of ensuring constant control over all the activities and processes of the hotel.
+Unported addons
+---------------
+addon | version | summary
+--- | --- | ---
+[board_frontdesk](board_frontdesk/) | 10.0.1.0.0 | Board for Hotel FrontDesk
+[hotel](hotel/) | 10.0.1.0.0 | Hotel Management Base
+[hotel_housekeeping](hotel_housekeeping/) | 10.0.1.0.0 | Hotel Housekeeping Management
+[hotel_reservation](hotel_reservation/) | 10.0.1.0.0 | Hotel Reservation Management
+[hotel_restaurant](hotel_restaurant/) | 10.0.1.0.0 | Hotel Restaurant Management
+[report_hotel_reservation](report_hotel_reservation/) | 10.0.1.0.0 | Hotel Reservation Management - Reporting
+[report_hotel_restaurant](report_hotel_restaurant/) | 10.0.1.0.0 | Restaurant Management - Reporting
-Help us do better by donating to us and motivating us : http://www.serpentcs.com/page/donate-to-serpentcs
-Thanks.
+[//]: # (end addons)
+
+----
+
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
+
+http://odoo-community.org/
diff --git a/board_frontdesk/README.rst b/board_frontdesk/README.rst
index d3a74c4..ea4d81c 100644
--- a/board_frontdesk/README.rst
+++ b/board_frontdesk/README.rst
@@ -1,50 +1,52 @@
-board_frontdesk
-
-This Module is provide Dashboard for Hotel Frontdesk
-
-You can manage:
--Real-Time Updates on Room Availability,
--Increase your Hospitality,
--Adapts with the Restaurant,
--Hassle-Free Currency Exchange
-
-Installation
-
-To install this module, you need to:
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: https://www.gnu.org/licenses/agpl
+ :alt: License: AGPL-3
-install 'board', 'report_hotel_restaurant', 'hotel_pos_restaurant' modules
-
-Configuration
+===============
+board_frontdesk
+===============
-To configure this module, you need to:
+Module for dashboard for a Hotel Frontdesk.
-have a Hotel Restaurant and POS Restaurant management functionality.
+This module implements a dashboard for hotel FrontDesk that includes:
-Usage
+* Calendar view of Today's Check-In and Check-Out
-To use this module, you need to:
+* Calendar view of Weekly Check-In and Check-Out
-go to apps, then install module to apply this functionality.
+* Calendar view of Monthly Check-In and Check-Out
-Try me on Runbot
-Known issues / Roadmap
+* Real-Time Updates on Room Availability
-...
Bug Tracker
+===========
-Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.
+Bugs are tracked on `GitHub Issues
+`_. In case of trouble, please
+check there if your issue has already been reported. If you spotted it first,
+help us smash it by providing detailed and welcomed feedback.
Credits
+=======
Contributors
+------------
-Serpent Consulting Services PVT. LTD.
+* Serpent Consulting Services Pvt. Ltd. (http://www.serpentcs.com)
Maintainer
+----------
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
+
+This module is maintained by the OCA.
-Serpent Consulting Services PVT. LTD.
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
-This module is maintained by the SerpentCS.
+To contribute to this module, please visit https://odoo-community.org.
-To contribute to this module, please visit https://github.com/JayVora-SerpentCS/hotelmgmt_v8.
diff --git a/hotel/README.rst b/hotel/README.rst
index 501efd7..fff7a4a 100644
--- a/hotel/README.rst
+++ b/hotel/README.rst
@@ -1,53 +1,53 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: https://www.gnu.org/licenses/agpl
+ :alt: License: AGPL-3
+
+=====
hotel
+=====
-This Module is for Providing Hotel management Features.
+Module for Complete Hotel management which includes the basic operations at a hotel/apartment.
You can manage:
--Hotel Booking,
--Hotel Facilities and Amenities,
--RESTURANTS,
--Currency Exchange,
--REPORTS
-
--Different reports are also provided, mainly for hotel.
-
-Installation
-
-To install this module, you need to:
-install 'sale_stock', 'point_of_sale', 'report' modules
+* Configure Property
-Configuration
+* Hotel Configuration
-To configure this module, you need to:
+* Manage history of Check In, Check out
-have a Hotel management functionality.
+* Manage Folio
-Usage
+* Payment
-To use this module, you need to:
-
-go to apps, then install module to apply this functionality.
-
-Try me on Runbot
-Known issues / Roadmap
-
-...
Bug Tracker
+===========
-Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.
+Bugs are tracked on `GitHub Issues
+`_. In case of trouble, please
+check there if your issue has already been reported. If you spotted it first,
+help us smash it by providing detailed and welcomed feedback.
Credits
+=======
Contributors
+------------
-Serpent Consulting Services PVT. LTD.
+* Serpent Consulting Services Pvt. Ltd. (http://www.serpentcs.com)
Maintainer
+----------
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
-Serpent Consulting Services PVT. LTD.
+This module is maintained by the OCA.
-This module is maintained by the SerpentCS.
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
-To contribute to this module, please visit https://github.com/JayVora-SerpentCS/OdooHotelManagementSystem.
+To contribute to this module, please visit https://odoo-community.org.
diff --git a/hotel/views/hotel_view.xml b/hotel/views/hotel_view.xml
index 643b855..20d34a4 100644
--- a/hotel/views/hotel_view.xml
+++ b/hotel/views/hotel_view.xml
@@ -149,7 +149,7 @@
Amenities Typehotel.room.amenities.type
- {'default_isamenitytype':1}
+ {}formtree,form
@@ -229,12 +229,7 @@
-
-
-
-
-
+
@@ -283,8 +278,8 @@
hotel.room.amenitiesformtree,form
- [('iscategid' , '=', True)]
- {'search_default_product_id':active_id,'default_product_id':active_id}
+ []
+ {'search_default_categ_id':active_id,'default_categ_id':active_id}
@@ -300,7 +295,7 @@
Amenities by Categoryir.actions.act_windowhotel.room.amenities.type
- [('amenity_id', '=', False)]
+ []tree
@@ -548,8 +543,8 @@
hotel.roomformtree,form
- [('isroom','=',True)]
- {'search_default_product_id':active_id,'default_product_id':active_id}
+ []
+ {'search_default_categ_id':active_id,'default_categ_id':active_id}
@@ -564,7 +559,7 @@
Rooms by Categoryir.actions.act_windowhotel.room.type
- [('categ_id','=',False)]
+ []tree
@@ -664,7 +659,6 @@
-
@@ -718,7 +712,6 @@
-
@@ -971,10 +964,6 @@
-
-
-
@@ -1023,8 +1012,8 @@
hotel.servicesformtree,form
- [('isservice', '=', True)]
- {'search_default_product_id':active_id,'default_product_id':active_id}
+ []
+ {'search_default_categ_id':active_id,'default_categ_id':active_id}
@@ -1040,7 +1029,7 @@
Services by Categoryir.actions.act_windowhotel.service.type
- [('service_id', '=', False)]
+ []tree
diff --git a/hotel_housekeeping/README.rst b/hotel_housekeeping/README.rst
index 2a75df1..9a1cac5 100644
--- a/hotel_housekeeping/README.rst
+++ b/hotel_housekeeping/README.rst
@@ -1,49 +1,47 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: https://www.gnu.org/licenses/agpl
+ :alt: License: AGPL-3
+
+==================
hotel_housekeeping
+==================
-This Module is for Providing Hotel Housekeeping Management.
+Module for Hotel/Hotel Housekeeping.
You can manage:
--Daily Cleaning Services,
--Checked By Inspector,
--Status Updation By Inspector
-
-Installation
-
-To install this module, you need to:
-
-install 'sale_stock', 'point_of_sale', 'report' modules
-
-Configuration
-To configure this module, you need to:
+* Complete Housekeeping process
-have a Hotel management functionality.
+* Historised Housekeeping with inventory and service data
-Usage
-
-To use this module, you need to:
-
-go to apps, then install module to apply this functionality.
-
-Try me on Runbot
-Known issues / Roadmap
-
-...
Bug Tracker
+===========
-Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.
+Bugs are tracked on `GitHub Issues
+`_. In case of trouble, please
+check there if your issue has already been reported. If you spotted it first,
+help us smash it by providing detailed and welcomed feedback.
Credits
+=======
Contributors
+------------
-Serpent Consulting Services PVT. LTD.
+* Serpent Consulting Services Pvt. Ltd. (http://www.serpentcs.com)
Maintainer
+----------
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
-Serpent Consulting Services PVT. LTD.
+This module is maintained by the OCA.
-This module is maintained by the SerpentCS.
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
-To contribute to this module, please visit https://github.com/JayVora-SerpentCS/OdooHotelManagementSystem.
+To contribute to this module, please visit https://odoo-community.org.
diff --git a/hotel_housekeeping/views/hotel_housekeeping_view.xml b/hotel_housekeeping/views/hotel_housekeeping_view.xml
index b58ebfd..5046101 100644
--- a/hotel_housekeeping/views/hotel_housekeeping_view.xml
+++ b/hotel_housekeeping/views/hotel_housekeeping_view.xml
@@ -171,7 +171,7 @@
name="Activity Types" action="action_hotel_housekeeping_activity_type_view_form"
parent="menu_hotel_activity" sequence="12" />
-
+
hotel.activity.form
diff --git a/hotel_pos_restaurant/README.rst b/hotel_pos_restaurant/README.rst
index 2fa935f..a4728b0 100644
--- a/hotel_pos_restaurant/README.rst
+++ b/hotel_pos_restaurant/README.rst
@@ -1,50 +1,52 @@
-hotel_pos_restaurant
-
-This Module is for Providing POS For Restaurants.
-
-You can manage:
--Order Details,
--Orders Added in Customer's Folio,
--Orders Invoice,
--Orders Payment
-
-Installation
-
-To install this module, you need to:
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: https://www.gnu.org/licenses/agpl
+ :alt: License: AGPL-3
-install 'pos_restaurant', 'sale_stock', 'point_of_sale', 'hotel_report_layout' modules
-
-Configuration
+====================
+hotel_pos_restaurant
+====================
-To configure this module, you need to:
+Module for dashboard for a Hotel POS Restaurant.
-have a Hotel POS Restaurant functionality.
+This module implements a dashboard for Hotel POS Restaurant that includes:
-Usage
+* Order Details
-To use this module, you need to:
+* Order's Added in Customer's Folio
-go to apps, then install module to apply this functionality.
+* Order's Invoice
-Try me on Runbot
-Known issues / Roadmap
+* Order's Payment
-...
Bug Tracker
+===========
-Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.
+Bugs are tracked on `GitHub Issues
+`_. In case of trouble, please
+check there if your issue has already been reported. If you spotted it first,
+help us smash it by providing detailed and welcomed feedback.
Credits
+=======
Contributors
+------------
-Serpent Consulting Services PVT. LTD.
+* Serpent Consulting Services Pvt. Ltd. (http://www.serpentcs.com)
Maintainer
+----------
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
+
+This module is maintained by the OCA.
-Serpent Consulting Services PVT. LTD.
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
-This module is maintained by the SerpentCS.
+To contribute to this module, please visit https://odoo-community.org.
-To contribute to this module, please visit https://github.com/JayVora-SerpentCS/OdooHotelManagementSystem.
diff --git a/hotel_reservation/README.rst b/hotel_reservation/README.rst
index 46aef53..c7987c1 100644
--- a/hotel_reservation/README.rst
+++ b/hotel_reservation/README.rst
@@ -1,49 +1,47 @@
-hotel_reservation
-
-This Module is Provide reservation for hotel rooms
-You can manage:
--Choose Available Rooms,
--Confirm Your Reservation,
--Generate Folio
-
-Installation
-
-To install this module, you need to:
-
-install 'stock', 'mail', 'sale_stock', 'point_of_sale',
-'hotel_report_layout' modules
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: https://www.gnu.org/licenses/agpl
+ :alt: License: AGPL-3
-Configuration
-
-To configure this module, you need to:
-
-have a Hotel management functionality.
+=================
+hotel_reservation
+=================
-Usage
+This Module is for Hotel/Resort/Property management.
-To use this module, you need to:
+You can manage:
-go to apps, then install module to apply this functionality.
+* Guest Reservation
-Try me on Runbot
-Known issues / Roadmap
+* Group Reservation
-...
Bug Tracker
+===========
-Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.
+Bugs are tracked on `GitHub Issues
+`_. In case of trouble, please
+check there if your issue has already been reported. If you spotted it first,
+help us smash it by providing detailed and welcomed feedback.
Credits
+=======
Contributors
+------------
-Serpent Consulting Services PVT. LTD.
+* Serpent Consulting Services Pvt. Ltd. (http://www.serpentcs.com)
Maintainer
+----------
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
-Serpent Consulting Services PVT. LTD.
+This module is maintained by the OCA.
-This module is maintained by the SerpentCS.
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
-To contribute to this module, please visit https://github.com/JayVora-SerpentCS/OdooHotelManagementSystem.
+To contribute to this module, please visit https://odoo-community.org.
diff --git a/hotel_reservation/__manifest__.py b/hotel_reservation/__manifest__.py
index f8c765a..eb37f97 100644
--- a/hotel_reservation/__manifest__.py
+++ b/hotel_reservation/__manifest__.py
@@ -16,6 +16,7 @@
'security/ir.model.access.csv',
'wizard/hotel_reservation_wizard.xml',
'report/hotel_reservation_report.xml',
+ 'views/email_temp_view.xml',
'views/hotel_reservation_sequence.xml',
'views/hotel_reservation_view.xml',
'views/report_checkin.xml',
diff --git a/hotel_reservation/models/hotel_reservation.py b/hotel_reservation/models/hotel_reservation.py
index 4181237..a20bc38 100644
--- a/hotel_reservation/models/hotel_reservation.py
+++ b/hotel_reservation/models/hotel_reservation.py
@@ -80,7 +80,7 @@ def write(self, vals):
Overrides orm write method.
@param self: The object pointer
@param vals: dictionary of fields value.
- update Hotel Room Reservation line history"""
+ Update Hotel Room Reservation line history"""
reservation_line_obj = self.env['hotel.room.reservation.line']
room_obj = self.env['hotel.room']
prod_id = vals.get('product_id') or self.product_id.id
@@ -169,7 +169,8 @@ class HotelReservation(models.Model):
'Reservation Line',
help='Hotel room reservation details.',
readonly=True,
- states={'draft': [('readonly', False)]})
+ states={'draft': [('readonly', False)]},
+ )
state = fields.Selection([('draft', 'Draft'), ('confirm', 'Confirm'),
('cancel', 'Cancel'), ('done', 'Done')],
'State', readonly=True,
@@ -191,6 +192,12 @@ def unlink(self):
state.') % (reserv_rec.state))
return super(HotelReservation, self).unlink()
+ @api.multi
+ def copy(self):
+ ctx = dict(self._context) or {}
+ ctx.update({'duplicate': True})
+ return super(HotelReservation, self.with_context(ctx)).copy()
+
@api.constrains('reservation_line', 'adults', 'children')
def check_reservation_rooms(self):
'''
@@ -199,6 +206,7 @@ def check_reservation_rooms(self):
@param self: object pointer
@return: raise a warning depending on the validation
'''
+ ctx = dict(self._context) or {}
for reservation in self:
cap = 0
for rec in reservation.reservation_line:
@@ -207,26 +215,27 @@ def check_reservation_rooms(self):
For Reservation.'))
for room in rec.reserve:
cap += room.capacity
- if (reservation.adults + reservation.children) > cap:
- raise ValidationError(_('Room Capacity Exceeded \n Please \
- Select Rooms According to Members \
- Accomodation.'))
+ if not ctx.get('duplicate'):
+ if (reservation.adults + reservation.children) > cap:
+ raise ValidationError(_('Room Capacity Exceeded \n Please \
+ Select Rooms According to Members \
+ Accomodation.'))
if reservation.adults <= 0:
raise ValidationError(_('Adults must be more than 0'))
@api.constrains('checkin', 'checkout')
def check_in_out_dates(self):
"""
- When date_order is less then checkin date or
- Checkout date should be greater than the checkin date.
+ When date_order is less then check-in date or
+ Checkout date should be greater than the check-in date.
"""
if self.checkout and self.checkin:
if self.checkin < self.date_order:
- raise except_orm(_('Warning'), _('Checkin date should be \
- greater than the current date.'))
+ raise ValidationError(_('Check-in date should be greater than \
+ the current date.'))
if self.checkout < self.checkin:
- raise except_orm(_('Warning'), _('Checkout date \
- should be greater than Checkin date.'))
+ raise ValidationError(_('Check-out date should be greater than \
+ Check-in date.'))
@api.model
def _needaction_count(self, domain=None):
@@ -272,43 +281,78 @@ def onchange_partner_id(self):
self.partner_shipping_id = addr['delivery']
self.pricelist_id = self.partner_id.property_product_pricelist.id
+ @api.model
+ def create(self, vals):
+ """
+ Overrides orm create method.
+ @param self: The object pointer
+ @param vals: dictionary of fields value.
+ """
+ if not vals:
+ vals = {}
+ vals['reservation_no'] = self.env['ir.sequence'].\
+ get('hotel.reservation')
+ return super(HotelReservation, self).create(vals)
+
@api.multi
def check_overlap(self, date1, date2):
+ date2 = datetime.strptime(date2, '%Y-%m-%d')
+ date1 = datetime.strptime(date1, '%Y-%m-%d')
delta = date2 - date1
return set([date1 + timedelta(days=i) for i in range(delta.days + 1)])
@api.multi
def confirmed_reservation(self):
"""
- This method create a new recordset for hotel room reservation line
- ------------------------------------------------------------------
+ This method create a new record set for hotel room reservation line
+ -------------------------------------------------------------------
@param self: The object pointer
@return: new record set for hotel room reservation line.
"""
reservation_line_obj = self.env['hotel.room.reservation.line']
+ vals = {}
for reservation in self:
+ reserv_checkin = datetime.strptime(reservation.checkin, dt)
+ reserv_checkout = datetime.strptime(reservation.checkout, dt)
+ room_bool = False
for line_id in reservation.reservation_line:
for room_id in line_id.reserve:
if room_id.room_reservation_line_ids:
for reserv in room_id.room_reservation_line_ids.\
- search([('status', '=', 'confirm')]):
- reserv_checkin = datetime.\
- strptime(reservation.checkin, dt)
- reserv_checkout = datetime.\
- strptime(reservation.checkout, dt)
+ search([('status', 'in', ('confirm', 'done')),
+ ('room_id', '=', room_id.id)]):
check_in = datetime.strptime(reserv.check_in, dt)
check_out = datetime.strptime(reserv.check_out, dt)
- range1 = [reserv_checkin, reserv_checkout]
- range2 = [check_in, check_out]
+ if check_in <= reserv_checkin <= check_out:
+ room_bool = True
+ if check_in <= reserv_checkout <= check_out:
+ room_bool = True
+ if reserv_checkin <= check_in and \
+ reserv_checkout >= check_out:
+ room_bool = True
+ mytime = "%Y-%m-%d"
+ r_checkin = datetime.strptime(reservation.checkin,
+ dt).date()
+ r_checkin = r_checkin.strftime(mytime)
+ r_checkout = datetime.\
+ strptime(reservation.checkout, dt).date()
+ r_checkout = r_checkout.strftime(mytime)
+ check_intm = datetime.strptime(reserv.check_in,
+ dt).date()
+ check_outtm = datetime.strptime(reserv.check_out,
+ dt).date()
+ check_intm = check_intm.strftime(mytime)
+ check_outtm = check_outtm.strftime(mytime)
+ range1 = [r_checkin, r_checkout]
+ range2 = [check_intm, check_outtm]
overlap_dates = self.check_overlap(*range1) \
& self.check_overlap(*range2)
- if overlap_dates:
- overlap_dates = [datetime.
- strftime(dates,
- '%d/%m/%Y') for
- dates in overlap_dates]
+ overlap_dates = [datetime.strftime(dates,
+ '%d/%m/%Y') for
+ dates in overlap_dates]
+ if room_bool:
raise ValidationError(_('You tried to Confirm '
- 'reservation with room'
+ 'Reservation with room'
' those already '
'reserved in this '
'Reservation Period. '
@@ -316,19 +360,16 @@ def confirmed_reservation(self):
'%s') % overlap_dates)
else:
self.state = 'confirm'
- for room_id in line_id.reserve:
- vals = {'room_id': room_id.id,
- 'check_in': reservation.checkin,
- 'check_out': reservation.checkout,
- 'state': 'assigned',
- 'reservation_id': reservation.id,
- }
- room_id.write({'isroom': False,
- 'status': 'occupied'})
- reservation_line_obj.create(vals)
- else:
- self.state = 'confirm'
- for room_id in line_id.reserve:
+ vals = {'room_id': room_id.id,
+ 'check_in': reservation.checkin,
+ 'check_out': reservation.checkout,
+ 'state': 'assigned',
+ 'reservation_id': reservation.id,
+ }
+ room_id.write({'isroom': False,
+ 'status': 'occupied'})
+ else:
+ self.state = 'confirm'
vals = {'room_id': room_id.id,
'check_in': reservation.checkin,
'check_out': reservation.checkout,
@@ -337,53 +378,23 @@ def confirmed_reservation(self):
}
room_id.write({'isroom': False,
'status': 'occupied'})
- reservation_line_obj.create(vals)
-# self._cr.execute("select count(*) from hotel_reservation as hr "
-# "inner join hotel_reservation_line as hrl on \
-# hrl.line_id = hr.id "
-# "inner join hotel_reservation_line_room_rel as \
-# hrlrr on hrlrr.room_id = hrl.id "
-# "where (checkin,checkout) overlaps \
-# ( timestamp %s, timestamp %s ) "
-# "and hr.id <> cast(%s as integer) "
-# "and hr.state = 'confirm' "
-# "and hrlrr.hotel_reservation_line_id in ("
-# "select hrlrr.hotel_reservation_line_id \
-# from hotel_reservation as hr "
-# "inner join hotel_reservation_line as \
-# hrl on hrl.line_id = hr.id "
-# "inner join hotel_reservation_line_room_rel \
-# as hrlrr on hrlrr.room_id = hrl.id "
-# "where hr.id = cast(%s as integer) )",
-# (reservation.checkin, reservation.checkout,
-# str(reservation.id), str(reservation.id)))
-# res = self._cr.fetchone()
-# roomcount = res and res[0] or 0.0
-# if roomcount:
-# raise ValidationError(_('You tried to confirm reservation \
-# with room those already reserved in this reservation \
-# period'))
-# else:
-# self.state = 'confirm'
-# for line_id in reservation.reservation_line:
-# line_id = line_id.reserve
-# for room_id in line_id:
-# vals = {
-# 'room_id': room_id.id,
-# 'check_in': reservation.checkin,
-# 'check_out': reservation.checkout,
-# 'state': 'assigned',
-# 'reservation_id': reservation.id,
-# }
-# room_id.write({'isroom': False,
-# 'status': 'occupied'})
-# reservation_line_obj.create(vals)
+ else:
+ self.state = 'confirm'
+ vals = {'room_id': room_id.id,
+ 'check_in': reservation.checkin,
+ 'check_out': reservation.checkout,
+ 'state': 'assigned',
+ 'reservation_id': reservation.id,
+ }
+ room_id.write({'isroom': False,
+ 'status': 'occupied'})
+ reservation_line_obj.create(vals)
return True
@api.multi
def cancel_reservation(self):
"""
- This method cancel recordset for hotel room reservation line
+ This method cancel record set for hotel room reservation line
------------------------------------------------------------------
@param self: The object pointer
@return: cancel record set for hotel room reservation line.
@@ -394,6 +405,7 @@ def cancel_reservation(self):
room_reservation_line = room_res_line_obj.search([('reservation_id',
'in', self.ids)])
room_reservation_line.write({'state': 'unassigned'})
+ room_reservation_line.unlink()
reservation_lines = hotel_res_line_obj.search([('line_id',
'in', self.ids)])
for reservation_line in reservation_lines:
@@ -418,7 +430,7 @@ def send_reservation_maill(self):
try:
template_id = (ir_model_data.get_object_reference
('hotel_reservation',
- 'email_template_hotel_reservation')[1])
+ 'mail_template_hotel_reservation')[1])
except ValueError:
template_id = False
try:
@@ -539,21 +551,6 @@ def onchange_check_dates(self, checkin_date=False, checkout_date=False,
value.update({'duration': duration})
return value
- @api.model
- def create(self, vals):
- """
- Overrides orm create method.
- @param self: The object pointer
- @param vals: dictionary of fields value.
- """
- if not vals:
- vals = {}
- if self._context is None:
- self._context = {}
- vals['reservation_no'] = self.env['ir.sequence'
- ].get('hotel.reservation')
- return super(HotelReservation, self).create(vals)
-
class HotelReservationLine(models.Model):
diff --git a/hotel_reservation/report/hotel_reservation_report.py b/hotel_reservation/report/hotel_reservation_report.py
index c8c2ccd..e826ff2 100644
--- a/hotel_reservation/report/hotel_reservation_report.py
+++ b/hotel_reservation/report/hotel_reservation_report.py
@@ -177,7 +177,8 @@ def render_html(self, docids, data=None):
_get_room_type = rm_act._get_room_type(date_start, date_end)
_get_room_nos = rm_act._get_room_nos(date_start, date_end)
get_data = rm_act.get_data(date_start, date_end)
- _get_room = rm_act._get_room_used_detail(date_start, date_end)
+ _get_room_used_detail = rm_act._get_room_used_detail(date_start,
+ date_end)
docargs = {
'doc_ids': docids,
'doc_model': self.model,
@@ -187,7 +188,7 @@ def render_html(self, docids, data=None):
'get_room_type': _get_room_type,
'get_room_nos': _get_room_nos,
'get_data': get_data,
- '_get_room_used_detail': _get_room,
+ 'get_room_used_detail': _get_room_used_detail,
}
docargs['data'].update({'date_end':
parser.parse(docargs.get('data').
diff --git a/hotel_reservation/views/email_temp_view.xml b/hotel_reservation/views/email_temp_view.xml
new file mode 100644
index 0000000..87fc8e8
--- /dev/null
+++ b/hotel_reservation/views/email_temp_view.xml
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+ Reservation-Send by Email
+ ${(object.warehouse_id.partner_id.email or '')}
+
+ Hotel Reservation Detail
+ ${(object.partner_id.id or '')}
+
+
+ Hello ${object.partner_id.name},
+
This is to confirm your booking for a room at the ${object.warehouse_id.name} Hotel,
+ % if object.warehouse_id.partner_id.city:
+ ${object.warehouse_id.partner_id.city},
+ % endif
+ % if object.warehouse_id.partner_id.country_id.name:
+ ${object.warehouse_id.partner_id.country_id.name}.
+ % endif
+ On behalf of the hotel, we would like to express our gratitude to you for choosing our services.
+ Please find all the details regarding the confirmation of the reservation on Date ${object.date_order} are listed below:
+
+ Details :
+
+ Name Of Guest : ${object.partner_id.name}
+ Date Of Arrival : ${object.checkin}
+ Date Of Departure : ${object.checkout}
+ Reservation Number : ${object.reservation_no}
+ Number Of Persons : ${object.adults} Adults and ${object.children} Childrens
+
+ Rooms Rates Per Night :
+
+
+
+
Room No
+
Amount
+
+ %for line in object.reservation_line:
+ %for line2 in line.reserve:
+
+
${line2.product_id.name}
+
${line2.product_id.list_price}
+
+ %endfor
+ %endfor
+
+
+
+We would appreciate it if you could let us know in case there are any changes in your schedule or program.
+In case you require check-in facilities at an earlier time due to flight changes or any other reasons, kindly inform us.
+We are sure that you will find our services satisfactory. In case you need to cancel your reservation,
+please Reply or Call us within 24 hours before the day of the check-in.
+We look forward to providing you quality services at our hotel.
+
diff --git a/hotel_restaurant/README.rst b/hotel_restaurant/README.rst
index 8e9d4f9..cc88d12 100644
--- a/hotel_restaurant/README.rst
+++ b/hotel_restaurant/README.rst
@@ -1,52 +1,55 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: https://www.gnu.org/licenses/agpl
+ :alt: License: AGPL-3
+
+================
hotel_restaurant
+================
This Module is for Hotel/Resort/Restaurant management.
-You can manage:
--Configure Property,
--Restaurant Configuration,
--table reservation,
--Generate and process Kitchen Order ticket,
--Payment
-
--Different reports are also provided, mainly for Restaurant.
-
-Installation
-To install this module, you need to:
-
-install 'sale_stock', 'point_of_sale', 'report' modules
-
-Configuration
+You can manage:
-To configure this module, you need to:
+* Configure Property,
-have a Hotel management functionality.
+* Restaurant Configuration,
-Usage
+* Table reservation,
-To use this module, you need to:
+* Generate and process Kitchen Order ticket,
-go to apps, then install module to apply this functionality.
+* Payment
-Try me on Runbot
-Known issues / Roadmap
+* Different reports are also provided, mainly for Restaurant.
-...
Bug Tracker
+===========
-Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.
+Bugs are tracked on `GitHub Issues
+`_. In case of trouble, please
+check there if your issue has already been reported. If you spotted it first,
+help us smash it by providing detailed and welcomed feedback.
Credits
+=======
Contributors
+------------
-Serpent Consulting Services PVT. LTD.
+* Serpent Consulting Services Pvt. Ltd. (http://www.serpentcs.com)
Maintainer
+----------
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
-Serpent Consulting Services PVT. LTD.
+This module is maintained by the OCA.
-This module is maintained by the SerpentCS.
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
-To contribute to this module, please visit https://github.com/JayVora-SerpentCS/OdooHotelManagementSystem.
+To contribute to this module, please visit https://odoo-community.org.
diff --git a/hotel_restaurant/report/hotel_restaurant_report.py b/hotel_restaurant/report/hotel_restaurant_report.py
index 19b7fa4..405f312 100644
--- a/hotel_restaurant/report/hotel_restaurant_report.py
+++ b/hotel_restaurant/report/hotel_restaurant_report.py
@@ -60,16 +60,24 @@ def render_html(self, docids, data=None):
class ReportKot(models.AbstractModel):
_name = 'report.hotel_restaurant.report_hotel_order_kot'
- _inherit = 'report.abstract_report'
- _template = 'hotel_restaurant.report_hotel_order_kot'
- _wrapped_report_class = HotelRestaurantReport
-
-class ReportBill(models.AbstractModel):
- _name = 'report.hotel_restaurant.report_hotel_order_kot'
- _inherit = 'report.abstract_report'
- _template = 'hotel_restaurant.report_hotel_order_kot'
- _wrapped_report_class = HotelRestaurantReport
+ @api.model
+ def render_html(self, docids, data):
+ report = self.env['report']
+ report_name = 'hotel_restaurant.report_hotel_order_kot'
+ kot_report = report._get_report_from_name(report_name)
+ if data is None:
+ data = {}
+ if not docids:
+ docids = data.get('docids')
+ kot_profile = self.env['hotel.restaurant.order'].browse(docids)
+ docargs = {
+ 'doc_ids': docids,
+ 'doc_model': kot_report.model,
+ 'docs': kot_profile,
+ 'data': data,
+ }
+ return report.render(report_name, docargs)
class FolioRestReport(models.AbstractModel):
diff --git a/hotel_restaurant/views/folio_order_report.xml b/hotel_restaurant/views/folio_order_report.xml
index 5e93778..08a1042 100644
--- a/hotel_restaurant/views/folio_order_report.xml
+++ b/hotel_restaurant/views/folio_order_report.xml
@@ -7,23 +7,6 @@
diff --git a/report_hotel_reservation/README.rst b/report_hotel_reservation/README.rst
index 0a452ae..7198969 100644
--- a/report_hotel_reservation/README.rst
+++ b/report_hotel_reservation/README.rst
@@ -1,45 +1,38 @@
-report_hotel_reservation
-
-This Module is Provide state wise view for hotel reservation
-for better business intelligence.
-
-Installation
-
-To install this module, you need to:
-
-install 'hotel_reservation' module.
-
-Configuration
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: https://www.gnu.org/licenses/agpl
+ :alt: License: AGPL-3
-To configure this module, you need to:
-
-have a Hotel Reservation functionality.
-
-Usage
-
-To use this module, you need to:
-
-go to apps, then install module to apply this functionality.
-
-Try me on Runbot
-Known issues / Roadmap
+========================
+report_hotel_reservation
+========================
-...
+This Module provides state-wise view for hotel reservation for better business intelligence.
Bug Tracker
+===========
-Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.
+Bugs are tracked on `GitHub Issues
+`_. In case of trouble, please
+check there if your issue has already been reported. If you spotted it first,
+help us smash it by providing detailed and welcomed feedback.
Credits
+=======
Contributors
+------------
-Serpent Consulting Services PVT. LTD.
+* Serpent Consulting Services Pvt. Ltd. (http://www.serpentcs.com)
Maintainer
+----------
-Serpent Consulting Services PVT. LTD.
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
-This module is maintained by the SerpentCS.
+This module is maintained by the OCA.
-To contribute to this module, please visit https://github.com/JayVora-SerpentCS/OdooHotelManagementSystem.
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
diff --git a/report_hotel_restaurant/README.rst b/report_hotel_restaurant/README.rst
index 2cbfc73..8b36aef 100644
--- a/report_hotel_restaurant/README.rst
+++ b/report_hotel_restaurant/README.rst
@@ -1,45 +1,40 @@
-report_hotel_restaurant
-
-This Module is Provide state wise view for hotel restaurant
-for better business intelligence.
-
-Installation
-
-To install this module, you need to:
-
-install 'hotel_restaurant', 'report_hotel_reservation' modules
-
-Configuration
-
-To configure this module, you need to:
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: https://www.gnu.org/licenses/agpl
+ :alt: License: AGPL-3
-have a Hotel Restaurant and Reservation functionality.
-
-Usage
-
-To use this module, you need to:
-
-go to apps, then install module to apply this functionality.
-
-Try me on Runbot
-Known issues / Roadmap
+=======================
+report_hotel_restaurant
+=======================
-...
+This Module provides state-wise view for hotel restaurant for better business intelligence.
Bug Tracker
+===========
-Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.
+Bugs are tracked on `GitHub Issues
+`_. In case of trouble, please
+check there if your issue has already been reported. If you spotted it first,
+help us smash it by providing detailed and welcomed feedback.
Credits
+=======
Contributors
+------------
-Serpent Consulting Services PVT. LTD.
+* Serpent Consulting Services Pvt. Ltd. (http://www.serpentcs.com)
Maintainer
+----------
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
-Serpent Consulting Services PVT. LTD.
+This module is maintained by the OCA.
-This module is maintained by the SerpentCS.
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
-To contribute to this module, please visit https://github.com/JayVora-SerpentCS/OdooHotelManagementSystem.
+To contribute to this module, please visit https://odoo-community.org.