class DocumentDetailSerializer(DocumentSerializer): from clients.serializers import ClientSerializer from projects.serializers import ProjectSerializer author = CRMUserTinySerializer(read_only=True) client = ClientSerializer() project = ProjectSerializer() task = ProjectTaskSerializer()
class CommunicationHistoryDetailSerializer(CommunicationHistorySerializer): from documents.serializers import DocumentSerializer from projects.serializers import ProjectSerializer author = CRMUserTinySerializer() contact = ContactPersonDetailSerializer() task = ProjectTaskSerializer() project = ProjectSerializer() document = DocumentSerializer()
class ProjectTaskUserSerializer(ProjectTaskSerializer): author = CRMUserTinySerializer(read_only=True) attached_persons = PersonApprovalUserSerializer( source='personapproval_set', many=True)
class ProjectTaskCommentUserSerializer(ProjectTaskCommentSerializer): author = CRMUserTinySerializer(read_only=True)
class PersonApprovalUserSerializer(PersonApprovalSerializer): person = CRMUserTinySerializer()
class TeamUserSerializer(TeamSerializer): members = CRMUserTinySerializer(many=True) teamlead = CRMUserTinySerializer()
class AdviceCommentUserSerializer(AdviceCommentSerializer): author = CRMUserTinySerializer(read_only=True)
class AdviceUserSerializer(AdviceSerializer): author = CRMUserTinySerializer(read_only=True)
class ClientDetailSerializer(ClientSerializer): status = ClientStatusSerializer() manager = CRMUserTinySerializer()