diff --git a/pms_api_rest/datamodels/pms_product.py b/pms_api_rest/datamodels/pms_product.py index a40470009..9a11a0bd2 100644 --- a/pms_api_rest/datamodels/pms_product.py +++ b/pms_api_rest/datamodels/pms_product.py @@ -15,3 +15,4 @@ class PmProductInfo(Datamodel): name = fields.String(required=False, allow_none=True) perDay = fields.Boolean(required=False, allow_none=True) perPerson = fields.Boolean(required=False, allow_none=True) + consumedOn = fields.String(required=False, allow_none=True) diff --git a/pms_api_rest/services/pms_product_service.py b/pms_api_rest/services/pms_product_service.py index 42259cfa6..a45176e6a 100644 --- a/pms_api_rest/services/pms_product_service.py +++ b/pms_api_rest/services/pms_product_service.py @@ -1,5 +1,3 @@ -from datetime import datetime - from odoo import _ from odoo.exceptions import MissingError @@ -54,6 +52,7 @@ class PmsProductService(Component): name=product.name, perDay=product.per_day, perPerson=product.per_person, + consumedOn=product.consumed_on, ) ) return result_products @@ -83,4 +82,3 @@ class PmsProductService(Component): ) else: raise MissingError(_("Product not found")) -