wbhuman_resources 1.56.4__py2.py3-none-any.whl → 1.56.5__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/models/employee.py +13 -3
- {wbhuman_resources-1.56.4.dist-info → wbhuman_resources-1.56.5.dist-info}/METADATA +1 -1
- {wbhuman_resources-1.56.4.dist-info → wbhuman_resources-1.56.5.dist-info}/RECORD +4 -4
- {wbhuman_resources-1.56.4.dist-info → wbhuman_resources-1.56.5.dist-info}/WHEEL +0 -0
|
@@ -1217,10 +1217,20 @@ def daily_birthday(sender, instance: Person, val_date: date, **kwargs) -> tuple[
|
|
|
1217
1217
|
"""
|
|
1218
1218
|
Cron task supposed to be ran every day. Check and notify employee about a colleague's birthday.
|
|
1219
1219
|
"""
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1220
|
+
|
|
1221
|
+
# If daily brief is a monday, we get the birthday that happen during the weekend as well
|
|
1222
|
+
if val_date.weekday() == 0:
|
|
1223
|
+
sunday = val_date - timedelta(days=1)
|
|
1224
|
+
saturday = val_date - timedelta(days=2)
|
|
1225
|
+
conditions = (
|
|
1226
|
+
(Q(profile__birthday__day=val_date.day) & Q(profile__birthday__month=val_date.month))
|
|
1227
|
+
| (Q(profile__birthday__day=sunday.day) & Q(profile__birthday__month=sunday.month))
|
|
1228
|
+
| (Q(profile__birthday__day=saturday.day) & Q(profile__birthday__month=saturday.month))
|
|
1223
1229
|
)
|
|
1230
|
+
else:
|
|
1231
|
+
conditions = Q(profile__birthday__day=val_date.day) & Q(profile__birthday__month=val_date.month)
|
|
1232
|
+
birthday_firstnames = list(
|
|
1233
|
+
EmployeeHumanResource.active_internal_employees.filter(conditions)
|
|
1224
1234
|
.exclude(profile=instance)
|
|
1225
1235
|
.values_list("profile__first_name", flat=True)
|
|
1226
1236
|
)
|
|
@@ -44,7 +44,7 @@ wbhuman_resources/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
44
44
|
wbhuman_resources/models/__init__.py,sha256=PW4LDmMpJqcynmnbdy_VSwbhxyDU9ZCR2LIXk6LkHlg,631
|
|
45
45
|
wbhuman_resources/models/absence.py,sha256=WDepyQjrySU860ESSZRP4Z13UlenMZD5JTsDS8Bm7xY,35892
|
|
46
46
|
wbhuman_resources/models/calendars.py,sha256=TjUaabVldDY4baZN9tGVJA609LUAZV2pCowTCEa4VYA,14621
|
|
47
|
-
wbhuman_resources/models/employee.py,sha256=
|
|
47
|
+
wbhuman_resources/models/employee.py,sha256=tfaHSccffScvRONhFtN4Rgj2QqLUUwm8oySRfWhBq-M,50290
|
|
48
48
|
wbhuman_resources/models/kpi.py,sha256=BrYKb56MKm5Ya0sIav3-jmw0qk4zKNoSRr0bYfNM9mk,7270
|
|
49
49
|
wbhuman_resources/models/preferences.py,sha256=iQhcu-jrEkk8DgM5hgakg5mdkbtlO11KeJC0QpTBcKI,1432
|
|
50
50
|
wbhuman_resources/models/review.py,sha256=QXXckJclht6iAw75_QL6bva4urHeSeUgbu4D_lsmiaw,39414
|
|
@@ -106,6 +106,6 @@ wbhuman_resources/viewsets/titles/absence.py,sha256=4F4ENgmZBGKiDuC8DmgrklNXEsRo
|
|
|
106
106
|
wbhuman_resources/viewsets/titles/employee.py,sha256=VP_AC3E-3fpbO8-RUvi2haXcoJr9LVLYtJifGawVRGo,565
|
|
107
107
|
wbhuman_resources/viewsets/titles/kpis.py,sha256=OSH_vIsIjfThWn17X_K7ykBKAFqNvz8M4PyFCF8BRQo,491
|
|
108
108
|
wbhuman_resources/viewsets/titles/review.py,sha256=fL_PqTNAIK7alk_-7RaklkiR9guh54u8oS0m5AWOSSc,2458
|
|
109
|
-
wbhuman_resources-1.56.
|
|
110
|
-
wbhuman_resources-1.56.
|
|
111
|
-
wbhuman_resources-1.56.
|
|
109
|
+
wbhuman_resources-1.56.5.dist-info/METADATA,sha256=ttVzCncaWP4GK01cVXKzJHOLNcFDii-Src4g3MQTBC4,272
|
|
110
|
+
wbhuman_resources-1.56.5.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
|
|
111
|
+
wbhuman_resources-1.56.5.dist-info/RECORD,,
|
|
File without changes
|