diff --git a/hotel_management_odoo/__manifest__.py b/hotel_management_odoo/__manifest__.py
index 2ff949ef9..c952cd12d 100644
--- a/hotel_management_odoo/__manifest__.py
+++ b/hotel_management_odoo/__manifest__.py
@@ -21,7 +21,7 @@
###############################################################################
{
'name': 'Odoo17 Hotel Management',
- 'version': '17.0.1.0.1',
+ 'version': '17.0.1.0.2',
'category': 'Industries',
'summary': """Hotel Management, Odoo Hotel Management, Hotel, Room Booking odoo, Amenities Odoo, Event management, Rooms, Events, Food, Booking, Odoo Hotel, Odoo17, Odoo Apps""",
'description': """The module helps you to manage rooms, amenities,
diff --git a/hotel_management_odoo/doc/RELEASE_NOTES.md b/hotel_management_odoo/doc/RELEASE_NOTES.md
index ae43252dd..b702b6a88 100644
--- a/hotel_management_odoo/doc/RELEASE_NOTES.md
+++ b/hotel_management_odoo/doc/RELEASE_NOTES.md
@@ -8,4 +8,9 @@
#### 29.03.2024
#### Version 17.0.1.0.1
#### UPDATE
- - Add a validation for timezone in dashboard.
\ No newline at end of file
+ - Add a validation for timezone in dashboard.
+
+#### 27.06.2024
+#### Version 17.0.1.0.2
+#### UPDATE
+ - Corrected the work flow of deleting and canceling records in room booking model
\ No newline at end of file
diff --git a/hotel_management_odoo/models/room_booking.py b/hotel_management_odoo/models/room_booking.py
index 2577c896e..30e02e998 100644
--- a/hotel_management_odoo/models/room_booking.py
+++ b/hotel_management_odoo/models/room_booking.py
@@ -233,6 +233,12 @@ class RoomBooking(models.Model):
help="This is the Total Amount for "
"Fleet", tracking=5)
+ def unlink(self):
+ for rec in self:
+ if rec.state != 'cancel' and rec.state != 'draft':
+ raise ValidationError('Cannot delete the Booking. Cancel the Booking ')
+ return super().unlink()
+
@api.model
def create(self, vals_list):
"""Sequence Generation"""
diff --git a/hotel_management_odoo/views/room_booking_views.xml b/hotel_management_odoo/views/room_booking_views.xml
index 3df7ab57e..a14f74291 100644
--- a/hotel_management_odoo/views/room_booking_views.xml
+++ b/hotel_management_odoo/views/room_booking_views.xml
@@ -12,12 +12,12 @@
class="btn-primary"/>
+ invisible=" maintenance_request_sent == True or state not in ('check_in', 'reserved')"/>
@@ -26,10 +26,9 @@
invisible="state != 'check_out'" type="object"/>
+ invisible="state not in ('draft', 'done') or invoice_button_visible == True"/>
+ invisible="state not in ('draft','reserved','check_out')" type="object" class="btn-secondary"/>