Skip to content

Commit

Permalink
[IMP] pms-api-rest: add image url in user service
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelpadin committed Jan 8, 2024
1 parent 92df491 commit 63518c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pms_api_rest/services/pms_user_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
from odoo.addons.base_rest_datamodel.restapi import Datamodel
from odoo.addons.component.core import Component

from ..pms_api_rest_utils import url_image_pms_api_rest


class PmsRoomTypeClassService(Component):
_inherit = "base.rest.service"
Expand Down Expand Up @@ -42,6 +44,9 @@ def get_user(self, user_id):
userEmail=user.email if user.email else "",
userPhone=user.phone if user.phone else "",
userImageBase64=user.image_1920 if user.image_1920 else "",
userImageUrl=url_image_pms_api_rest(
"res.partner", user.partner_id.id, "image_1024"
),
isNewInterfaceUser=user.is_new_interface_app_user,
)

Expand Down

0 comments on commit 63518c9

Please sign in to comment.