From 4daf6f79cf85130510f17700863e40d55f8d71e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Lodeiros?= Date: Wed, 19 Oct 2022 17:16:46 +0200 Subject: [PATCH] [FIX]pms_api_rest: sintax error with _create_vals_from_params in reservation service --- .../services/pms_reservation_service.py | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/pms_api_rest/services/pms_reservation_service.py b/pms_api_rest/services/pms_reservation_service.py index 2334dd09d..4e2278586 100644 --- a/pms_api_rest/services/pms_reservation_service.py +++ b/pms_api_rest/services/pms_reservation_service.py @@ -116,18 +116,6 @@ class PmsReservationService(Component): ) return res - @restapi.method( - [ - ( - [ - "/p/", - ], - "PATCH", - ) - ], - input_param=Datamodel("pms.reservation.info", is_list=False), - auth="jwt_api_pms", - ) def _create_vals_from_params(self, reservation_vals, reservation_data): if reservation_data.preferredRoomId: reservation_vals.update( @@ -148,8 +136,18 @@ class PmsReservationService(Component): {"segmentation_ids": [(6, 0, [reservation_data.segmentationId])]} ) - return reservation_vals - + @restapi.method( + [ + ( + [ + "/p/", + ], + "PATCH", + ) + ], + input_param=Datamodel("pms.reservation.info", is_list=False), + auth="jwt_api_pms", + ) # TODO: route changed because bug route CORS patch def update_reservation(self, reservation_id, reservation_data): reservation = self.env["pms.reservation"].search([("id", "=", reservation_id)])