From 0fdaeec726fd7c6a42c503110d83feffe4c6807b Mon Sep 17 00:00:00 2001 From: Horilla Date: Tue, 16 Sep 2025 17:31:38 +0530 Subject: [PATCH] [UPDT] HORILLA_DOCUMENTS: Updated document request view into pipeline view --- horilla_documents/models.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/horilla_documents/models.py b/horilla_documents/models.py index 882f835ab..87241375a 100644 --- a/horilla_documents/models.py +++ b/horilla_documents/models.py @@ -6,6 +6,7 @@ from django.db import models from django.db.models.signals import m2m_changed, post_save from django.dispatch import receiver from django.forms import ValidationError +from django.urls import reverse_lazy from django.utils.translation import gettext as _ from base.horilla_company_manager import HorillaCompanyManager @@ -53,6 +54,20 @@ class DocumentRequest(HorillaModel): related_company_field="employee_id__employee_work_info__company_id" ) + def get_edit_url(self): + """ + Returns the edit url of the document request + """ + + return reverse_lazy("document-request-update", args=[self.pk]) + + def get_delete_url(self): + """ + Returns the delete url of the document request + """ + + return reverse_lazy("document-request-delete", args=[self.pk]) + class Meta: """ Meta class to add additional options