diff --git a/employee/forms.py b/employee/forms.py index e5f75f7aa..d9b558de9 100644 --- a/employee/forms.py +++ b/employee/forms.py @@ -636,7 +636,7 @@ class DisciplinaryActionForm(ModelForm): class Meta: model = DisciplinaryAction fields = "__all__" - exclude = ["company_id", "objects", "is_active"] + exclude = ["objects", "is_active"] widgets = { "start_date": forms.DateInput(attrs={"type": "date"}), } diff --git a/employee/models.py b/employee/models.py index 5d6a394b5..6e3ca5fe3 100644 --- a/employee/models.py +++ b/employee/models.py @@ -763,7 +763,7 @@ class Policy(HorillaModel): attachments = models.ManyToManyField(PolicyMultipleFile, blank=True) company_id = models.ManyToManyField(Company, blank=True, verbose_name=_("Company")) - objects = HorillaCompanyManager() + objects = HorillaCompanyManager("company_id") def delete(self, *args, **kwargs): super().delete(*args, **kwargs) @@ -879,9 +879,7 @@ class DisciplinaryAction(HorillaModel): attachment = models.FileField( upload_to="employee/discipline", null=True, blank=True ) - company_id = models.ManyToManyField(Company, blank=True) - - objects = HorillaCompanyManager() + objects = HorillaCompanyManager("employee_id__employee_work_info__company_id") def __str__(self) -> str: return f"{self.action}" diff --git a/employee/templates/organisation_chart/org_chart.html b/employee/templates/organisation_chart/org_chart.html index 53c2a24ed..a42af2859 100644 --- a/employee/templates/organisation_chart/org_chart.html +++ b/employee/templates/organisation_chart/org_chart.html @@ -6,10 +6,8 @@
-

Organizational Chart

-