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 = []
|
result_users = []
|
||||||
ResUsersInfo = self.env.datamodels["res.users.info"]
|
ResUsersInfo = self.env.datamodels["res.users.info"]
|
||||||
users = self.env["res.users"].search(
|
users = self.env["res.users"].search(
|
||||||
[("pms_property_id", "=", pms_property_id)]
|
[("pms_property_ids", "in", pms_property_id)]
|
||||||
)
|
)
|
||||||
for user in users:
|
for user in users:
|
||||||
result_users.append(ResUsersInfo(id=user.id, name=user.name))
|
result_users.append(ResUsersInfo(id=user.id, name=user.name))
|
||||||
|
|||||||
@@ -96,9 +96,7 @@ class PmsReservationService(Component):
|
|||||||
allowedCheckout=reservation.allowed_checkout,
|
allowedCheckout=reservation.allowed_checkout,
|
||||||
isSplitted=reservation.splitted,
|
isSplitted=reservation.splitted,
|
||||||
pendingCheckinData=reservation.pending_checkin_data,
|
pendingCheckinData=reservation.pending_checkin_data,
|
||||||
createDate=datetime.combine(
|
createDate=reservation.create_date.isoformat(),
|
||||||
reservation.create_date, datetime.min.time()
|
|
||||||
).isoformat(),
|
|
||||||
segmentationId=reservation.segmentation_ids[0].id
|
segmentationId=reservation.segmentation_ids[0].id
|
||||||
if reservation.segmentation_ids
|
if reservation.segmentation_ids
|
||||||
else None,
|
else None,
|
||||||
|
|||||||
Reference in New Issue
Block a user