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.
- wbhuman_resources/__init__.py +1 -0
- wbhuman_resources/admin/__init__.py +5 -0
- wbhuman_resources/admin/absence.py +113 -0
- wbhuman_resources/admin/calendars.py +37 -0
- wbhuman_resources/admin/employee.py +109 -0
- wbhuman_resources/admin/kpi.py +21 -0
- wbhuman_resources/admin/review.py +157 -0
- wbhuman_resources/apps.py +23 -0
- wbhuman_resources/dynamic_preferences_registry.py +119 -0
- wbhuman_resources/factories/__init__.py +38 -0
- wbhuman_resources/factories/absence.py +109 -0
- wbhuman_resources/factories/calendars.py +60 -0
- wbhuman_resources/factories/employee.py +80 -0
- wbhuman_resources/factories/kpi.py +155 -0
- wbhuman_resources/filters/__init__.py +20 -0
- wbhuman_resources/filters/absence.py +109 -0
- wbhuman_resources/filters/absence_graphs.py +85 -0
- wbhuman_resources/filters/calendars.py +28 -0
- wbhuman_resources/filters/employee.py +81 -0
- wbhuman_resources/filters/kpi.py +35 -0
- wbhuman_resources/filters/review.py +134 -0
- wbhuman_resources/filters/signals.py +27 -0
- wbhuman_resources/locale/de/LC_MESSAGES/django.mo +0 -0
- wbhuman_resources/locale/de/LC_MESSAGES/django.po +2207 -0
- wbhuman_resources/locale/de/LC_MESSAGES/django.po.translated +2456 -0
- wbhuman_resources/locale/en/LC_MESSAGES/django.mo +0 -0
- wbhuman_resources/locale/en/LC_MESSAGES/django.po +2091 -0
- wbhuman_resources/locale/fr/LC_MESSAGES/django.mo +0 -0
- wbhuman_resources/locale/fr/LC_MESSAGES/django.po +2093 -0
- wbhuman_resources/management/__init__.py +23 -0
- wbhuman_resources/migrations/0001_initial_squashed_squashed_0015_alter_absencerequest_calendaritem_ptr_and_more.py +949 -0
- wbhuman_resources/migrations/0016_alter_employeehumanresource_options.py +20 -0
- wbhuman_resources/migrations/0017_absencerequest_crossborder_country_and_more.py +55 -0
- wbhuman_resources/migrations/0018_remove_position_group_position_groups.py +32 -0
- wbhuman_resources/migrations/0019_alter_absencerequest_options_alter_kpi_options_and_more.py +44 -0
- wbhuman_resources/migrations/0020_alter_employeeyearbalance_year_alter_review_year.py +27 -0
- wbhuman_resources/migrations/0021_alter_position_color.py +18 -0
- wbhuman_resources/migrations/0022_remove_review_editable_mode.py +64 -0
- wbhuman_resources/migrations/__init__.py +0 -0
- wbhuman_resources/models/__init__.py +23 -0
- wbhuman_resources/models/absence.py +903 -0
- wbhuman_resources/models/calendars.py +370 -0
- wbhuman_resources/models/employee.py +1241 -0
- wbhuman_resources/models/kpi.py +199 -0
- wbhuman_resources/models/preferences.py +40 -0
- wbhuman_resources/models/review.py +982 -0
- wbhuman_resources/permissions/__init__.py +0 -0
- wbhuman_resources/permissions/backend.py +26 -0
- wbhuman_resources/serializers/__init__.py +49 -0
- wbhuman_resources/serializers/absence.py +308 -0
- wbhuman_resources/serializers/calendars.py +73 -0
- wbhuman_resources/serializers/employee.py +267 -0
- wbhuman_resources/serializers/kpi.py +80 -0
- wbhuman_resources/serializers/review.py +415 -0
- wbhuman_resources/signals.py +4 -0
- wbhuman_resources/tasks.py +195 -0
- wbhuman_resources/templates/review/review_report.html +322 -0
- wbhuman_resources/tests/__init__.py +1 -0
- wbhuman_resources/tests/conftest.py +96 -0
- wbhuman_resources/tests/models/__init__.py +0 -0
- wbhuman_resources/tests/models/test_absences.py +478 -0
- wbhuman_resources/tests/models/test_calendars.py +209 -0
- wbhuman_resources/tests/models/test_employees.py +502 -0
- wbhuman_resources/tests/models/test_review.py +103 -0
- wbhuman_resources/tests/models/test_utils.py +110 -0
- wbhuman_resources/tests/signals.py +108 -0
- wbhuman_resources/tests/test_permission.py +64 -0
- wbhuman_resources/tests/test_tasks.py +74 -0
- wbhuman_resources/urls.py +221 -0
- wbhuman_resources/utils.py +43 -0
- wbhuman_resources/viewsets/__init__.py +61 -0
- wbhuman_resources/viewsets/absence.py +312 -0
- wbhuman_resources/viewsets/absence_charts.py +328 -0
- wbhuman_resources/viewsets/buttons/__init__.py +7 -0
- wbhuman_resources/viewsets/buttons/absence.py +32 -0
- wbhuman_resources/viewsets/buttons/employee.py +44 -0
- wbhuman_resources/viewsets/buttons/kpis.py +16 -0
- wbhuman_resources/viewsets/buttons/review.py +195 -0
- wbhuman_resources/viewsets/calendars.py +103 -0
- wbhuman_resources/viewsets/display/__init__.py +39 -0
- wbhuman_resources/viewsets/display/absence.py +334 -0
- wbhuman_resources/viewsets/display/calendars.py +83 -0
- wbhuman_resources/viewsets/display/employee.py +254 -0
- wbhuman_resources/viewsets/display/kpis.py +92 -0
- wbhuman_resources/viewsets/display/review.py +429 -0
- wbhuman_resources/viewsets/employee.py +210 -0
- wbhuman_resources/viewsets/endpoints/__init__.py +42 -0
- wbhuman_resources/viewsets/endpoints/absence.py +57 -0
- wbhuman_resources/viewsets/endpoints/calendars.py +18 -0
- wbhuman_resources/viewsets/endpoints/employee.py +51 -0
- wbhuman_resources/viewsets/endpoints/kpis.py +53 -0
- wbhuman_resources/viewsets/endpoints/review.py +191 -0
- wbhuman_resources/viewsets/kpi.py +280 -0
- wbhuman_resources/viewsets/menu/__init__.py +22 -0
- wbhuman_resources/viewsets/menu/absence.py +50 -0
- wbhuman_resources/viewsets/menu/administration.py +15 -0
- wbhuman_resources/viewsets/menu/calendars.py +33 -0
- wbhuman_resources/viewsets/menu/employee.py +44 -0
- wbhuman_resources/viewsets/menu/kpis.py +18 -0
- wbhuman_resources/viewsets/menu/review.py +97 -0
- wbhuman_resources/viewsets/mixins.py +14 -0
- wbhuman_resources/viewsets/review.py +837 -0
- wbhuman_resources/viewsets/titles/__init__.py +18 -0
- wbhuman_resources/viewsets/titles/absence.py +30 -0
- wbhuman_resources/viewsets/titles/employee.py +18 -0
- wbhuman_resources/viewsets/titles/kpis.py +15 -0
- wbhuman_resources/viewsets/titles/review.py +62 -0
- wbhuman_resources/viewsets/utils.py +28 -0
- wbhuman_resources-1.58.4.dist-info/METADATA +8 -0
- wbhuman_resources-1.58.4.dist-info/RECORD +111 -0
- 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
|
+
)
|