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

@ -468,6 +468,14 @@ class ConfigGroupSoftware(GroupsCommonFields, SaveHistory):
]
def get_url_kwargs(self) -> dict:
return {
'group_id': self.config_group.id,
'pk': self.id
}
@property
def parent_object(self):
""" Fetch the parent object """