diff --git a/hotel_management_odoo/doc/RELEASE_NOTES.md b/hotel_management_odoo/doc/RELEASE_NOTES.md index eb2a52735..90d218925 100644 --- a/hotel_management_odoo/doc/RELEASE_NOTES.md +++ b/hotel_management_odoo/doc/RELEASE_NOTES.md @@ -18,4 +18,9 @@ #### 09.06.2025 #### Version 18.0.1.1.1 #### UPDT -- Added copy=false in some fields of room_booking model \ No newline at end of file +- Added copy=false in some fields of room_booking model + +#### 19.08.2025 +#### Version 18.0.1.1.2 +#### UPDT +- Fixed the error shown while click Add Line in Food, Service or any extra Services \ No newline at end of file diff --git a/hotel_management_odoo/models/event_booking_line.py b/hotel_management_odoo/models/event_booking_line.py index 3a689f7ec..895e994da 100644 --- a/hotel_management_odoo/models/event_booking_line.py +++ b/hotel_management_odoo/models/event_booking_line.py @@ -76,14 +76,14 @@ class EventBookingLine(models.Model): string="Order Status", help="State of Room Booking", copy=False) - @api.depends('uom_qty', 'price_unit', 'tax_ids') + @api.depends('uom_qty', 'price_unit', 'tax_ids','currency_id') def _compute_price_subtotal(self): """Compute the amounts of the room booking line.""" for line in self: base_line = line._prepare_base_line_for_taxes_computation() self.env['account.tax']._add_tax_details_in_base_line(base_line, self.env.company) - line.price_subtotal = base_line['tax_details']['total_excluded_currency'] - line.price_total = base_line['tax_details']['total_included_currency'] + line.price_subtotal = base_line['tax_details']['raw_total_excluded_currency'] + line.price_total = base_line['tax_details']['raw_total_included_currency'] line.price_tax = line.price_total - line.price_subtotal if self.env.context.get('import_file', False) and not self.env.user. \ diff --git a/hotel_management_odoo/models/fleet_booking_line.py b/hotel_management_odoo/models/fleet_booking_line.py index cd50f3721..496dc6090 100644 --- a/hotel_management_odoo/models/fleet_booking_line.py +++ b/hotel_management_odoo/models/fleet_booking_line.py @@ -87,8 +87,8 @@ class FleetBookingLine(models.Model): for line in self: base_line = line._prepare_base_line_for_taxes_computation() self.env['account.tax']._add_tax_details_in_base_line(base_line, self.env.company) - line.price_subtotal = base_line['tax_details']['total_excluded_currency'] - line.price_total = base_line['tax_details']['total_included_currency'] + line.price_subtotal = base_line['tax_details']['raw_total_excluded_currency'] + line.price_total = base_line['tax_details']['raw_total_included_currency'] line.price_tax = line.price_total - line.price_subtotal if self.env.context.get('import_file', False) and not self.env.user. \ diff --git a/hotel_management_odoo/models/food_booking_line.py b/hotel_management_odoo/models/food_booking_line.py index 6c822c548..45eb5a72f 100644 --- a/hotel_management_odoo/models/food_booking_line.py +++ b/hotel_management_odoo/models/food_booking_line.py @@ -85,8 +85,8 @@ class FoodBookingLine(models.Model): for line in self: base_line = line._prepare_base_line_for_taxes_computation() self.env['account.tax']._add_tax_details_in_base_line(base_line, self.env.company) - line.price_subtotal = base_line['tax_details']['total_excluded_currency'] - line.price_total = base_line['tax_details']['total_included_currency'] + line.price_subtotal = base_line['tax_details']['raw_total_excluded_currency'] + line.price_total = base_line['tax_details']['raw_total_included_currency'] line.price_tax = line.price_total - line.price_subtotal if self.env.context.get('import_file', False) and not self.env.user. \ diff --git a/hotel_management_odoo/models/room_booking_line.py b/hotel_management_odoo/models/room_booking_line.py index 41598b1ce..0fb908803 100644 --- a/hotel_management_odoo/models/room_booking_line.py +++ b/hotel_management_odoo/models/room_booking_line.py @@ -105,16 +105,14 @@ class RoomBookingLine(models.Model): qty = qty + 1 self.uom_qty = qty - @api.depends('uom_qty', 'price_unit', 'tax_ids') + @api.depends('uom_qty', 'price_unit', 'tax_ids','currency_id') def _compute_price_subtotal(self): """Compute the amounts of the room booking line.""" for line in self: base_line = line._prepare_base_line_for_taxes_computation() self.env['account.tax']._add_tax_details_in_base_line(base_line, self.env.company) line.price_subtotal = base_line['tax_details']['raw_total_excluded_currency'] - print("total_excluded_currency",line.price_subtotal) line.price_total = base_line['tax_details']['raw_total_included_currency'] - print("total_included_currency",line.price_total) line.price_tax = line.price_total - line.price_subtotal if self.env.context.get('import_file', False) and not self.env.user. \ @@ -128,7 +126,10 @@ class RoomBookingLine(models.Model): :return: A python dictionary. """ + self.ensure_one() + if not self.booking_id.pricelist_id: + self.currency_id = self.env.company.currency_id return self.env['account.tax']._prepare_base_line_for_taxes_computation( self, **{ diff --git a/hotel_management_odoo/models/service_booking_line.py b/hotel_management_odoo/models/service_booking_line.py index 675ef3491..8543244fa 100644 --- a/hotel_management_odoo/models/service_booking_line.py +++ b/hotel_management_odoo/models/service_booking_line.py @@ -86,8 +86,8 @@ class ServiceBookingLine(models.Model): for line in self: base_line = line._prepare_base_line_for_taxes_computation() self.env['account.tax']._add_tax_details_in_base_line(base_line, self.env.company) - line.price_subtotal = base_line['tax_details']['total_excluded_currency'] - line.price_total = base_line['tax_details']['total_included_currency'] + line.price_subtotal = base_line['tax_details']['raw_total_excluded_currency'] + line.price_total = base_line['tax_details']['raw_total_included_currency'] line.price_tax = line.price_total - line.price_subtotal if self.env.context.get('import_file', False) and not self.env.user. \ diff --git a/hotel_management_odoo/static/description/index.html b/hotel_management_odoo/static/description/index.html index 7934e09d5..73165ed83 100644 --- a/hotel_management_odoo/static/description/index.html +++ b/hotel_management_odoo/static/description/index.html @@ -1056,6 +1056,34 @@
+
+

+ Latest Release 18.0.1.1.2 +

+ + 19th August, 2025 + +
+
+
+
+
+ BUG FIX +
+
+
+
    +
  • + Fixed the error shown while click Add Line in Food, Service or any extra Services. +
  • + +
+
+
+
+
+