mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]: pms-api-rest: add channel type @ sale channels
This commit is contained in:
committed by
Darío Lodeiros
parent
84af645cab
commit
5675e96b05
@@ -12,3 +12,4 @@ class PmsSaleChannelInfo(Datamodel):
|
||||
_name = "pms.sale.channel.info"
|
||||
id = fields.Integer(required=True, allow_none=False)
|
||||
name = fields.String(required=True, allow_none=False)
|
||||
channelType = fields.String(required=True, allow_none=True)
|
||||
|
||||
@@ -59,6 +59,7 @@ class PmsSaleChannelService(Component):
|
||||
PmsSaleChannelInfo(
|
||||
id=sale_channel.id,
|
||||
name=sale_channel.name if sale_channel.name else None,
|
||||
channelType=sale_channel.channel_type if sale_channel.channel_type else None,
|
||||
)
|
||||
)
|
||||
return result_sale_channels
|
||||
|
||||
Reference in New Issue
Block a user