wbhuman_resources 1.58.4__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. wbhuman_resources/__init__.py +1 -0
  2. wbhuman_resources/admin/__init__.py +5 -0
  3. wbhuman_resources/admin/absence.py +113 -0
  4. wbhuman_resources/admin/calendars.py +37 -0
  5. wbhuman_resources/admin/employee.py +109 -0
  6. wbhuman_resources/admin/kpi.py +21 -0
  7. wbhuman_resources/admin/review.py +157 -0
  8. wbhuman_resources/apps.py +23 -0
  9. wbhuman_resources/dynamic_preferences_registry.py +119 -0
  10. wbhuman_resources/factories/__init__.py +38 -0
  11. wbhuman_resources/factories/absence.py +109 -0
  12. wbhuman_resources/factories/calendars.py +60 -0
  13. wbhuman_resources/factories/employee.py +80 -0
  14. wbhuman_resources/factories/kpi.py +155 -0
  15. wbhuman_resources/filters/__init__.py +20 -0
  16. wbhuman_resources/filters/absence.py +109 -0
  17. wbhuman_resources/filters/absence_graphs.py +85 -0
  18. wbhuman_resources/filters/calendars.py +28 -0
  19. wbhuman_resources/filters/employee.py +81 -0
  20. wbhuman_resources/filters/kpi.py +35 -0
  21. wbhuman_resources/filters/review.py +134 -0
  22. wbhuman_resources/filters/signals.py +27 -0
  23. wbhuman_resources/locale/de/LC_MESSAGES/django.mo +0 -0
  24. wbhuman_resources/locale/de/LC_MESSAGES/django.po +2207 -0
  25. wbhuman_resources/locale/de/LC_MESSAGES/django.po.translated +2456 -0
  26. wbhuman_resources/locale/en/LC_MESSAGES/django.mo +0 -0
  27. wbhuman_resources/locale/en/LC_MESSAGES/django.po +2091 -0
  28. wbhuman_resources/locale/fr/LC_MESSAGES/django.mo +0 -0
  29. wbhuman_resources/locale/fr/LC_MESSAGES/django.po +2093 -0
  30. wbhuman_resources/management/__init__.py +23 -0
  31. wbhuman_resources/migrations/0001_initial_squashed_squashed_0015_alter_absencerequest_calendaritem_ptr_and_more.py +949 -0
  32. wbhuman_resources/migrations/0016_alter_employeehumanresource_options.py +20 -0
  33. wbhuman_resources/migrations/0017_absencerequest_crossborder_country_and_more.py +55 -0
  34. wbhuman_resources/migrations/0018_remove_position_group_position_groups.py +32 -0
  35. wbhuman_resources/migrations/0019_alter_absencerequest_options_alter_kpi_options_and_more.py +44 -0
  36. wbhuman_resources/migrations/0020_alter_employeeyearbalance_year_alter_review_year.py +27 -0
  37. wbhuman_resources/migrations/0021_alter_position_color.py +18 -0
  38. wbhuman_resources/migrations/0022_remove_review_editable_mode.py +64 -0
  39. wbhuman_resources/migrations/__init__.py +0 -0
  40. wbhuman_resources/models/__init__.py +23 -0
  41. wbhuman_resources/models/absence.py +903 -0
  42. wbhuman_resources/models/calendars.py +370 -0
  43. wbhuman_resources/models/employee.py +1241 -0
  44. wbhuman_resources/models/kpi.py +199 -0
  45. wbhuman_resources/models/preferences.py +40 -0
  46. wbhuman_resources/models/review.py +982 -0
  47. wbhuman_resources/permissions/__init__.py +0 -0
  48. wbhuman_resources/permissions/backend.py +26 -0
  49. wbhuman_resources/serializers/__init__.py +49 -0
  50. wbhuman_resources/serializers/absence.py +308 -0
  51. wbhuman_resources/serializers/calendars.py +73 -0
  52. wbhuman_resources/serializers/employee.py +267 -0
  53. wbhuman_resources/serializers/kpi.py +80 -0
  54. wbhuman_resources/serializers/review.py +415 -0
  55. wbhuman_resources/signals.py +4 -0
  56. wbhuman_resources/tasks.py +195 -0
  57. wbhuman_resources/templates/review/review_report.html +322 -0
  58. wbhuman_resources/tests/__init__.py +1 -0
  59. wbhuman_resources/tests/conftest.py +96 -0
  60. wbhuman_resources/tests/models/__init__.py +0 -0
  61. wbhuman_resources/tests/models/test_absences.py +478 -0
  62. wbhuman_resources/tests/models/test_calendars.py +209 -0
  63. wbhuman_resources/tests/models/test_employees.py +502 -0
  64. wbhuman_resources/tests/models/test_review.py +103 -0
  65. wbhuman_resources/tests/models/test_utils.py +110 -0
  66. wbhuman_resources/tests/signals.py +108 -0
  67. wbhuman_resources/tests/test_permission.py +64 -0
  68. wbhuman_resources/tests/test_tasks.py +74 -0
  69. wbhuman_resources/urls.py +221 -0
  70. wbhuman_resources/utils.py +43 -0
  71. wbhuman_resources/viewsets/__init__.py +61 -0
  72. wbhuman_resources/viewsets/absence.py +312 -0
  73. wbhuman_resources/viewsets/absence_charts.py +328 -0
  74. wbhuman_resources/viewsets/buttons/__init__.py +7 -0
  75. wbhuman_resources/viewsets/buttons/absence.py +32 -0
  76. wbhuman_resources/viewsets/buttons/employee.py +44 -0
  77. wbhuman_resources/viewsets/buttons/kpis.py +16 -0
  78. wbhuman_resources/viewsets/buttons/review.py +195 -0
  79. wbhuman_resources/viewsets/calendars.py +103 -0
  80. wbhuman_resources/viewsets/display/__init__.py +39 -0
  81. wbhuman_resources/viewsets/display/absence.py +334 -0
  82. wbhuman_resources/viewsets/display/calendars.py +83 -0
  83. wbhuman_resources/viewsets/display/employee.py +254 -0
  84. wbhuman_resources/viewsets/display/kpis.py +92 -0
  85. wbhuman_resources/viewsets/display/review.py +429 -0
  86. wbhuman_resources/viewsets/employee.py +210 -0
  87. wbhuman_resources/viewsets/endpoints/__init__.py +42 -0
  88. wbhuman_resources/viewsets/endpoints/absence.py +57 -0
  89. wbhuman_resources/viewsets/endpoints/calendars.py +18 -0
  90. wbhuman_resources/viewsets/endpoints/employee.py +51 -0
  91. wbhuman_resources/viewsets/endpoints/kpis.py +53 -0
  92. wbhuman_resources/viewsets/endpoints/review.py +191 -0
  93. wbhuman_resources/viewsets/kpi.py +280 -0
  94. wbhuman_resources/viewsets/menu/__init__.py +22 -0
  95. wbhuman_resources/viewsets/menu/absence.py +50 -0
  96. wbhuman_resources/viewsets/menu/administration.py +15 -0
  97. wbhuman_resources/viewsets/menu/calendars.py +33 -0
  98. wbhuman_resources/viewsets/menu/employee.py +44 -0
  99. wbhuman_resources/viewsets/menu/kpis.py +18 -0
  100. wbhuman_resources/viewsets/menu/review.py +97 -0
  101. wbhuman_resources/viewsets/mixins.py +14 -0
  102. wbhuman_resources/viewsets/review.py +837 -0
  103. wbhuman_resources/viewsets/titles/__init__.py +18 -0
  104. wbhuman_resources/viewsets/titles/absence.py +30 -0
  105. wbhuman_resources/viewsets/titles/employee.py +18 -0
  106. wbhuman_resources/viewsets/titles/kpis.py +15 -0
  107. wbhuman_resources/viewsets/titles/review.py +62 -0
  108. wbhuman_resources/viewsets/utils.py +28 -0
  109. wbhuman_resources-1.58.4.dist-info/METADATA +8 -0
  110. wbhuman_resources-1.58.4.dist-info/RECORD +111 -0
  111. wbhuman_resources-1.58.4.dist-info/WHEEL +5 -0
@@ -0,0 +1,20 @@
1
+ # Generated by Django 4.1.9 on 2023-06-02 06:15
2
+
3
+ from django.db import migrations
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("wbhuman_resources", "0001_initial_squashed_squashed_0015_alter_absencerequest_calendaritem_ptr_and_more"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.AlterModelOptions(
13
+ name="employeehumanresource",
14
+ options={
15
+ "permissions": [("global_manager", "Is a Global Manager?")],
16
+ "verbose_name": "Employee Human Resource",
17
+ "verbose_name_plural": "Employee Human Resources",
18
+ },
19
+ ),
20
+ ]
@@ -0,0 +1,55 @@
1
+ # Generated by Django 4.1.9 on 2023-06-08 09:58
2
+
3
+ import django.db.models.deletion
4
+ from django.db import migrations, models
5
+
6
+
7
+ class Migration(migrations.Migration):
8
+ dependencies = [
9
+ ("auth", "0012_alter_user_first_name_max_length"),
10
+ ("geography", "0001_initial"),
11
+ ("wbhuman_resources", "0016_alter_employeehumanresource_options"),
12
+ ]
13
+
14
+ operations = [
15
+ migrations.AddField(
16
+ model_name="absencerequest",
17
+ name="crossborder_country",
18
+ field=models.ForeignKey(
19
+ blank=True,
20
+ help_text="The country where this absence request will be held.",
21
+ limit_choices_to={"level": 1},
22
+ null=True,
23
+ on_delete=django.db.models.deletion.PROTECT,
24
+ related_name="absence_requests",
25
+ to="geography.geography",
26
+ verbose_name="Crossborder Country",
27
+ ),
28
+ ),
29
+ migrations.AddField(
30
+ model_name="absencerequesttype",
31
+ name="crossborder_countries",
32
+ field=models.ManyToManyField(
33
+ blank=True,
34
+ help_text="List of countries where crossborder activity is allowed",
35
+ limit_choices_to={"level": 1},
36
+ to="geography.geography",
37
+ verbose_name="Countries",
38
+ ),
39
+ ),
40
+ migrations.AddField(
41
+ model_name="absencerequesttype",
42
+ name="extra_notify_groups",
43
+ field=models.ManyToManyField(
44
+ blank=True,
45
+ related_name="notified_absence_request_types",
46
+ to="auth.group",
47
+ verbose_name="Extra Notify Groups",
48
+ ),
49
+ ),
50
+ migrations.AddField(
51
+ model_name="absencerequesttype",
52
+ name="is_country_necessary",
53
+ field=models.BooleanField(default=False, verbose_name="Is country necessary"),
54
+ ),
55
+ ]
@@ -0,0 +1,32 @@
1
+ # Generated by Django 4.2.9 on 2024-02-14 15:00
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ def migrate_group(apps, schema_editor):
7
+ Position = apps.get_model("wbhuman_resources", "Position")
8
+ for position in Position.objects.filter(group__isnull=False):
9
+ if position.group not in position.groups.all():
10
+ position.groups.add(position.group)
11
+
12
+
13
+ class Migration(migrations.Migration):
14
+ dependencies = [
15
+ ("auth", "0012_alter_user_first_name_max_length"),
16
+ ("wbhuman_resources", "0017_absencerequest_crossborder_country_and_more"),
17
+ ]
18
+
19
+ operations = [
20
+ migrations.AddField(
21
+ model_name="position",
22
+ name="groups",
23
+ field=models.ManyToManyField(blank=True, related_name="human_resources_positions", to="auth.group"),
24
+ ),
25
+ migrations.RunSQL(sql="SET CONSTRAINTS ALL IMMEDIATE;"),
26
+ migrations.RunPython(migrate_group),
27
+ migrations.RunSQL(sql="SET CONSTRAINTS ALL DEFERRED;"),
28
+ migrations.RemoveField(
29
+ model_name="position",
30
+ name="group",
31
+ ),
32
+ ]
@@ -0,0 +1,44 @@
1
+ # Generated by Django 4.2.9 on 2024-02-20 10:08
2
+
3
+ from django.db import migrations
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("wbhuman_resources", "0018_remove_position_group_position_groups"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.AlterModelOptions(
13
+ name="absencerequest",
14
+ options={
15
+ "permissions": [("administrate_absencerequest", "Can Administrate Absence Requests")],
16
+ "verbose_name": "Absence Request",
17
+ "verbose_name_plural": "Absence Requests",
18
+ },
19
+ ),
20
+ migrations.AlterModelOptions(
21
+ name="kpi",
22
+ options={
23
+ "permissions": [("administrate_kpi", "Can Administrate KPI")],
24
+ "verbose_name": "Key Performance Indicator",
25
+ "verbose_name_plural": "Key Performance Indicators",
26
+ },
27
+ ),
28
+ migrations.AlterModelOptions(
29
+ name="review",
30
+ options={
31
+ "permissions": [("administrate_review", "Can Administrate Reviews")],
32
+ "verbose_name": "Review",
33
+ "verbose_name_plural": "Reviews",
34
+ },
35
+ ),
36
+ migrations.AlterModelOptions(
37
+ name="employeehumanresource",
38
+ options={
39
+ "permissions": [("administrate_employeehumanresource", "Can administrate Employee Human Resource")],
40
+ "verbose_name": "Employee Human Resource",
41
+ "verbose_name_plural": "Employee Human Resources",
42
+ },
43
+ ),
44
+ ]
@@ -0,0 +1,27 @@
1
+ # Generated by Django 4.2.10 on 2024-03-06 09:29
2
+
3
+ import wbcore.models.fields
4
+ from django.db import migrations
5
+
6
+
7
+ class Migration(migrations.Migration):
8
+ dependencies = [
9
+ ("wbhuman_resources", "0019_alter_absencerequest_options_alter_kpi_options_and_more"),
10
+ ]
11
+
12
+ operations = [
13
+ migrations.AlterField(
14
+ model_name="employeeyearbalance",
15
+ name="year",
16
+ field=wbcore.models.fields.YearField(verbose_name="Year"),
17
+ ),
18
+ migrations.AlterField(
19
+ model_name="review",
20
+ name="year",
21
+ field=wbcore.models.fields.YearField(blank=True, null=True, verbose_name="Year"),
22
+ ),
23
+ migrations.RemoveField(
24
+ model_name="position",
25
+ name="is_internal",
26
+ ),
27
+ ]
@@ -0,0 +1,18 @@
1
+ # Generated by Django 5.0.3 on 2024-04-11 08:24
2
+
3
+ import colorfield.fields
4
+ from django.db import migrations
5
+
6
+
7
+ class Migration(migrations.Migration):
8
+ dependencies = [
9
+ ("wbhuman_resources", "0020_alter_employeeyearbalance_year_alter_review_year"),
10
+ ]
11
+
12
+ operations = [
13
+ migrations.AlterField(
14
+ model_name="position",
15
+ name="color",
16
+ field=colorfield.fields.ColorField(default="#FF0000", image_field=None, max_length=25, samples=None),
17
+ ),
18
+ ]
@@ -0,0 +1,64 @@
1
+ # Generated by Django 5.0.9 on 2024-12-03 16:06
2
+
3
+ from django.db import migrations, models
4
+ from django.db.models.functions import RowNumber
5
+
6
+
7
+ def migrate_order(apps, schema_editor):
8
+ ReviewQuestion = apps.get_model("wbhuman_resources", "ReviewQuestion")
9
+ Review = apps.get_model("wbhuman_resources", "Review")
10
+ ReviewQuestionCategory = apps.get_model("wbhuman_resources", "ReviewQuestionCategory")
11
+
12
+ for review in Review.objects.all():
13
+ questions = ReviewQuestion.objects.filter(review=review).annotate(
14
+ row_number=models.Window(
15
+ expression=RowNumber(),
16
+ )
17
+ )
18
+ for question in questions:
19
+ question.order = question.row_number
20
+ question.save()
21
+
22
+ for row_number, category in enumerate(ReviewQuestionCategory.objects.order_by("order"), start=1):
23
+ category.order = row_number
24
+ category.save()
25
+
26
+
27
+ class Migration(migrations.Migration):
28
+ dependencies = [
29
+ ("wbhuman_resources", "0021_alter_position_color"),
30
+ ]
31
+
32
+ operations = [
33
+ migrations.RemoveField(
34
+ model_name="review",
35
+ name="editable_mode",
36
+ ),
37
+ migrations.RunPython(migrate_order),
38
+ migrations.AlterModelOptions(
39
+ name="reviewquestion",
40
+ options={
41
+ "ordering": ("review", "category", "order"),
42
+ "verbose_name": "Review Question",
43
+ "verbose_name_plural": "Review Questions",
44
+ },
45
+ ),
46
+ migrations.AlterField(
47
+ model_name="reviewquestion",
48
+ name="order",
49
+ field=models.PositiveIntegerField(db_index=True, editable=False, verbose_name="order"),
50
+ ),
51
+ migrations.AlterModelOptions(
52
+ name="reviewquestioncategory",
53
+ options={
54
+ "ordering": ("order",),
55
+ "verbose_name": "Review Question Category",
56
+ "verbose_name_plural": "Review Question Categories",
57
+ },
58
+ ),
59
+ migrations.AlterField(
60
+ model_name="reviewquestioncategory",
61
+ name="order",
62
+ field=models.PositiveIntegerField(db_index=True, editable=False, verbose_name="order"),
63
+ ),
64
+ ]
File without changes
@@ -0,0 +1,23 @@
1
+ from .absence import AbsenceRequest, AbsenceRequestPeriods, AbsenceRequestType
2
+ from .calendars import DayOff, DayOffCalendar, DefaultDailyPeriod
3
+ from .employee import (
4
+ BalanceHourlyAllowance,
5
+ EmployeeHumanResource,
6
+ EmployeeWeeklyOffPeriods,
7
+ EmployeeYearBalance,
8
+ Position,
9
+ deactivate_profile_as_task,
10
+ default_vacation_days_per_year,
11
+ )
12
+ from .kpi import KPI, Evaluation
13
+ from .review import (
14
+ Review,
15
+ ReviewAnswer,
16
+ ReviewGroup,
17
+ ReviewQuestion,
18
+ ReviewQuestionCategory,
19
+ create_review_from_template,
20
+ send_review_report_via_mail,
21
+ submit_review,
22
+ submit_reviews_from_group,
23
+ )