diff --git a/hotel/views/inherited_res_company_views.xml b/hotel_calendar/views/inherited_res_company_views.xml similarity index 100% rename from hotel/views/inherited_res_company_views.xml rename to hotel_calendar/views/inherited_res_company_views.xml diff --git a/hotel_calendar/views/res_config.xml b/hotel_calendar/views/res_config.xml deleted file mode 100644 index ef6b5862d..000000000 --- a/hotel_calendar/views/res_config.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - res.config.calendar.settings.view.form.inherit.hotel - res.config.settings - - - - -

Calendar Colors

-
-
-
-
- Set Background Colors -
-
-
- - - - - - - - - - - - -
-
-
-
-
- Set Letter Colors -
-
-
- - - - - - - - - - - - -
-
-
-
-
-
-
-
- -
diff --git a/hotel_roommatik/models/inherited_hotel_checkin_partner.py b/hotel_roommatik/models/inherited_hotel_checkin_partner.py index f2240328a..d3e83a21e 100644 --- a/hotel_roommatik/models/inherited_hotel_checkin_partner.py +++ b/hotel_roommatik/models/inherited_hotel_checkin_partner.py @@ -98,8 +98,10 @@ class HotelCheckinPartner(models.Model): def rm_get_stay(self, code): # BUSQUEDA POR LOCALIZADOR checkin_partner = self.search([('id', '=', code)]) + # TODO: refactoring 'res.config.settings', 'default_arrival_hour' by the current self.env.user.hotel_id.arrival_hour default_arrival_hour = self.env['ir.default'].sudo().get( 'res.config.settings', 'default_arrival_hour') + # TODO: refactoring 'res.config.settings', 'default_departure_hour' by the current self.env.user.hotel_id.departure_hour default_departure_hour = self.env['ir.default'].sudo().get( 'res.config.settings', 'default_departure_hour') if any(checkin_partner): diff --git a/hotel_roommatik/models/inherited_hotel_reservation.py b/hotel_roommatik/models/inherited_hotel_reservation.py index 6ce38fcfe..c178b556c 100644 --- a/hotel_roommatik/models/inherited_hotel_reservation.py +++ b/hotel_roommatik/models/inherited_hotel_reservation.py @@ -36,10 +36,12 @@ class HotelReservation(models.Model): reservations = reservations.filtered( lambda x: x.state in ('draft', 'confirm')) if any(reservations): + # TODO: refactoring 'res.config.settings', 'default_arrival_hour' by the current self.env.user.hotel_id.arrival_hour default_arrival_hour = self.env['ir.default'].sudo().get( 'res.config.settings', 'default_arrival_hour') checkin = "%s %s" % (reservations[0].checkin, default_arrival_hour) + # TODO: refactoring 'res.config.settings', 'default_departure_hour' by the current self.env.user.hotel_id.departure_hour default_departure_hour = self.env['ir.default'].sudo().get( 'res.config.settings', 'default_departure_hour') checkout = "%s %s" % (reservations[0].checkout, diff --git a/hotel_roommatik/models/inherited_hotel_room_type.py b/hotel_roommatik/models/inherited_hotel_room_type.py index 89d844611..d6110edb4 100644 --- a/hotel_roommatik/models/inherited_hotel_room_type.py +++ b/hotel_roommatik/models/inherited_hotel_room_type.py @@ -17,6 +17,7 @@ class HotelRoomType(models.Model): @api.model def rm_get_all_room_type_rates(self): room_types = self.env['hotel.room.type'].search([]) + # TODO: refactoring 'res.config.settings', 'default_departure_hour' by the current self.env.user.hotel_id tz_hotel = self.env['ir.default'].sudo().get( 'res.config.settings', 'tz_hotel') dfrom = fields.Date.context_today(self.with_context( diff --git a/hotel_roommatik/models/roommatik.py b/hotel_roommatik/models/roommatik.py index f7f521368..01e55ae17 100755 --- a/hotel_roommatik/models/roommatik.py +++ b/hotel_roommatik/models/roommatik.py @@ -22,6 +22,7 @@ class RoomMatik(models.Model): @api.model def rm_get_date(self): # RoomMatik API Gets the current business date/time. (MANDATORY) + # TODO: refactoring 'res.config.settings', 'default_departure_hour' by the current self.env.user.hotel_id tz_hotel = self.env['ir.default'].sudo().get( 'res.config.settings', 'tz_hotel') self_tz = self.with_context(tz=tz_hotel)