mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[RFC]pms_api_rest: Refactor PATCH reservation with lines like a NestedModel
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from marshmallow import fields
|
||||
|
||||
from odoo.addons.datamodel.core import Datamodel
|
||||
from odoo.addons.datamodel.fields import NestedModel
|
||||
|
||||
|
||||
class PmsReservationShortInfo(Datamodel):
|
||||
@@ -64,5 +65,7 @@ class PmsReservationInfo(Datamodel):
|
||||
priceOnlyServices = fields.Float(required=False, allow_none=True)
|
||||
priceOnlyRoom = fields.Float(required=False, allow_none=True)
|
||||
|
||||
reservationLines = fields.List(NestedModel("pms.reservation.line.info"))
|
||||
|
||||
# TODO: Refact
|
||||
# messages = fields.List(fields.Dict(required=False, allow_none=True))
|
||||
|
||||
Reference in New Issue
Block a user