diff --git a/hotel/models/hotel_service.py b/hotel/models/hotel_service.py index fb91c629f..ab2c4ea85 100644 --- a/hotel/models/hotel_service.py +++ b/hotel/models/hotel_service.py @@ -512,10 +512,11 @@ class HotelService(models.Model): if reservation and self.is_board_service: board_room_type = reservation.board_service_room_id if board_room_type.price_type == 'fixed': - return self.env['hotel.board.service.room.type.line'].search([ - ('hotel_board_service_room_type_id', - '=', board_room_type.id), - ('product_id', '=', self.product_id.id)]).amount + return self.env['hotel.board.service.room.type.line'].\ + search([ + ('hotel_board_service_room_type_id', + '=', board_room_type.id), + ('product_id', '=', self.product_id.id)]).amount else: return (reservation.price_total * self.env['hotel.board.service.room.type.line']. diff --git a/hotel/models/inherited_payment_return.py b/hotel/models/inherited_payment_return.py index f11ee9fc7..b7726c609 100644 --- a/hotel/models/inherited_payment_return.py +++ b/hotel/models/inherited_payment_return.py @@ -27,7 +27,8 @@ class PaymentReturn(models.Model): payments = self.env['account.payment'].search([ ('move_line_ids', 'in', line.move_line_ids.ids) ]) - folios_line = self.env['hotel.folio'].browse(payments.mapped('folio_id.id')) + folios_line = self.env['hotel.folio'].browse( + payments.mapped('folio_id.id')) for folio in folios_line: if self.id not in folio.return_ids.ids: folio.update({'return_ids': [(4, self.id)]}) diff --git a/hotel/models/inherited_res_company.py b/hotel/models/inherited_res_company.py index c485179b3..79b3a7eb7 100644 --- a/hotel/models/inherited_res_company.py +++ b/hotel/models/inherited_res_company.py @@ -12,15 +12,15 @@ class ResCompany(models.Model): # TODO: need extra explanation or remove otherwise # additional_hours = fields.Integer('Additional Hours', # help="Provide the min hours value for \ - # check in, checkout days, whatever \ - # the hours will be provided here based \ - # on that extra days will be \ - # calculated.") + # check in, checkout days, whatever \ + # the hours will be provided here based \ + # on that extra days will be \ + # calculated.") # TODO: move the text to the default template for confirmed reservations # cardex_warning = fields.Text( # 'Warning in Cardex', # default="Time to access rooms: 14: 00h. Departure time: \ - # 12: 00h. If the accommodation is not left at that time, \ - # the establishment will charge a day's stay according to \ - # current rate that day", + # 12: 00h. If the accommodation is not left at that time, \ + # the establishment will charge a day's stay according to \ + # current rate that day", # help="Notice under the signature on the traveler's ticket.") diff --git a/hotel/models/inherited_res_partner.py b/hotel/models/inherited_res_partner.py index c328013ab..a2370bf0d 100644 --- a/hotel/models/inherited_res_partner.py +++ b/hotel/models/inherited_res_partner.py @@ -2,8 +2,6 @@ # Copyright 2017 Dario Lodeiros # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, fields, models -from odoo.osv.expression import get_unaccent_wrapper -from odoo.exceptions import ValidationError import logging _logger = logging.getLogger(__name__)