From a986b095c9421dac7e4831724bfa2d86648f5622 Mon Sep 17 00:00:00 2001 From: Sara Lago Date: Fri, 4 Feb 2022 11:26:32 +0100 Subject: [PATCH] [IMP] pms_api_rest: show reservation when property isn't specified in url --- pms_api_rest/services/pms_reservation_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pms_api_rest/services/pms_reservation_service.py b/pms_api_rest/services/pms_reservation_service.py index 9dcc51df9..c583ba8ac 100644 --- a/pms_api_rest/services/pms_reservation_service.py +++ b/pms_api_rest/services/pms_reservation_service.py @@ -27,7 +27,8 @@ class PmsReservationService(Component): def get_reservation(self, reservation_id, pms_search_param): domain = list() domain.append(("id", "=", reservation_id)) - domain.append(("pms_property_id", "=", pms_search_param.pms_property_id)) + if pms_search_param.pms_property_id: + domain.append(("pms_property_id", "=", pms_search_param.pms_property_id)) reservation = self.env["pms.reservation"].search(domain) res = [] PmsReservationInfo = self.env.datamodels["pms.reservation.info"]