[IMP]pms_api_rest: add product consumed on

This commit is contained in:
Darío Lodeiros
2022-08-09 11:45:56 +02:00
parent a3a2aaf290
commit 273bfd7c2b
2 changed files with 2 additions and 3 deletions

View File

@@ -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)

View File

@@ -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"))