[UPDT] HORILLA_DOCUMENTS: Updated document request view into pipeline view
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user