Browse Source

Jun 27: [FIX] Bug Fixed 'hotel_management_odoo'

pull/331/head
RisvanaCybro 1 year ago
parent
commit
843126ab84
  1. 2
      hotel_management_odoo/__manifest__.py
  2. 7
      hotel_management_odoo/doc/RELEASE_NOTES.md
  3. 6
      hotel_management_odoo/models/room_booking.py
  4. 9
      hotel_management_odoo/views/room_booking_views.xml

2
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,

7
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.
- 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

6
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"""

9
hotel_management_odoo/views/room_booking_views.xml

@ -12,12 +12,12 @@
class="btn-primary"/>
<button name="action_checkin" string="Check-In"
class="btn-primary"
invisible="is_checkin == True or (state in ['check_in','check_out','done','cancel'])"
invisible="is_checkin == True or state in ('check_in','check_out','done','cancel')"
type="object"/>
<button name="action_maintenance_request"
string="Maintenance Request" type="object"
class="btn-primary"
invisible=" maintenance_request_sent == True or ( state not in ['check_in', 'reserved'])"/>
invisible=" maintenance_request_sent == True or state not in ('check_in', 'reserved')"/>
<button name="action_checkout" string="Check-Out"
class="btn-primary" invisible="state != 'check_in'"
type="object"/>
@ -26,10 +26,9 @@
invisible="state != 'check_out'" type="object"/>
<button name="action_invoice" string="Create Invoice"
type="object" class="btn-primary"
invisible="state not in ['draft', 'check_out'] or invoice_button_visible == True"/>
invisible="state not in ('draft', 'done') or invoice_button_visible == True"/>
<button name="action_cancel" string="Cancel"
invisible="state not in ['draft','reserved']"
type="object" class="btn-secondary"/>
invisible="state not in ('draft','reserved','check_out')" type="object" class="btn-secondary"/>
<field name="state" select="2" widget="statusbar"
statusbar_visible="draft,check_in,check_out,done"/>
<field name="invoice_status" select="2" widget="statusbar"

Loading…
Cancel
Save