mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX]pms-api-rest: fixed service of property users and create date field in reservation service
This commit is contained in:
@@ -137,7 +137,7 @@ class PmsPropertyService(Component):
|
||||
result_users = []
|
||||
ResUsersInfo = self.env.datamodels["res.users.info"]
|
||||
users = self.env["res.users"].search(
|
||||
[("pms_property_id", "=", pms_property_id)]
|
||||
[("pms_property_ids", "in", pms_property_id)]
|
||||
)
|
||||
for user in users:
|
||||
result_users.append(ResUsersInfo(id=user.id, name=user.name))
|
||||
|
||||
@@ -96,9 +96,7 @@ class PmsReservationService(Component):
|
||||
allowedCheckout=reservation.allowed_checkout,
|
||||
isSplitted=reservation.splitted,
|
||||
pendingCheckinData=reservation.pending_checkin_data,
|
||||
createDate=datetime.combine(
|
||||
reservation.create_date, datetime.min.time()
|
||||
).isoformat(),
|
||||
createDate=reservation.create_date.isoformat(),
|
||||
segmentationId=reservation.segmentation_ids[0].id
|
||||
if reservation.segmentation_ids
|
||||
else None,
|
||||
|
||||
Reference in New Issue
Block a user