mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]pms_api_rest: add product consumed on
This commit is contained in:
@@ -15,3 +15,4 @@ class PmProductInfo(Datamodel):
|
|||||||
name = fields.String(required=False, allow_none=True)
|
name = fields.String(required=False, allow_none=True)
|
||||||
perDay = fields.Boolean(required=False, allow_none=True)
|
perDay = fields.Boolean(required=False, allow_none=True)
|
||||||
perPerson = fields.Boolean(required=False, allow_none=True)
|
perPerson = fields.Boolean(required=False, allow_none=True)
|
||||||
|
consumedOn = fields.String(required=False, allow_none=True)
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
from datetime import datetime
|
|
||||||
|
|
||||||
from odoo import _
|
from odoo import _
|
||||||
from odoo.exceptions import MissingError
|
from odoo.exceptions import MissingError
|
||||||
|
|
||||||
@@ -54,6 +52,7 @@ class PmsProductService(Component):
|
|||||||
name=product.name,
|
name=product.name,
|
||||||
perDay=product.per_day,
|
perDay=product.per_day,
|
||||||
perPerson=product.per_person,
|
perPerson=product.per_person,
|
||||||
|
consumedOn=product.consumed_on,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return result_products
|
return result_products
|
||||||
@@ -83,4 +82,3 @@ class PmsProductService(Component):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
raise MissingError(_("Product not found"))
|
raise MissingError(_("Product not found"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user