[ADD] pms_api_rest: add reservation id to reservation service service

This commit is contained in:
miguelpadin
2022-11-23 16:37:10 +01:00
committed by Darío Lodeiros
parent a7d8fabdcc
commit 77e28271c0
2 changed files with 2 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ from odoo.addons.datamodel.fields import NestedModel
class PmsServiceInfo(Datamodel):
_name = "pms.service.info"
id = fields.Integer(required=False, allow_none=True)
reservationId = fields.Integer(required=False, allow_none=True)
name = fields.String(required=False, allow_none=True)
productId = fields.Integer(required=False, allow_none=True)
quantity = fields.Integer(required=False, allow_none=True)

View File

@@ -397,6 +397,7 @@ class PmsReservationService(Component):
result_services.append(
PmsServiceInfo(
id=service.id,
reservationId=service.reservation_id,
name=service.name,
productId=service.product_id.id,
quantity=service.product_qty,