[UPDT] RECRUITMENT: Updated recruitment with the 2 new stages for newly created recruitment for candidates from application and direct creation

This commit is contained in:
Horilla
2024-10-17 16:35:02 +05:30
parent 4bbb64f985
commit cdc8b4ba59
5 changed files with 15 additions and 5 deletions

View File

@@ -251,8 +251,15 @@ def create_initial_stage(sender, instance, created, **kwargs):
This is post save method, used to create initial stage for the recruitment
"""
if created:
applied_stage = Stage()
applied_stage.sequence = 0
applied_stage.recruitment_id = instance
applied_stage.stage = "Applied"
applied_stage.stage_type = "applied"
applied_stage.save()
initial_stage = Stage()
initial_stage.sequence = 0
initial_stage.sequence = 1
initial_stage.recruitment_id = instance
initial_stage.stage = "Initial"
initial_stage.stage_type = "initial"
@@ -266,6 +273,7 @@ class Stage(HorillaModel):
stage_types = [
("initial", _("Initial")),
("applied", _("Applied")),
("test", _("Test")),
("interview", _("Interview")),
("cancelled", _("Cancelled")),