refactor: Add function get_url to tenancy models

ref: #248 #366 #391 nofusscomputing/centurion_erp_ui#29
This commit is contained in:
2024-11-17 18:57:30 +09:30
parent f420bc6f6a
commit 05f03efc64
6 changed files with 110 additions and 10 deletions

View File

@ -110,6 +110,14 @@ class ProjectMilestone(ProjectCommonFieldsName):
return self.name
def get_url_kwargs(self) -> dict:
return {
'project_id': self.project.id,
'pk': self.id
}
@property
def parent_object(self):
""" Fetch the parent object """