wbcrm 1.56.2__py2.py3-none-any.whl → 1.56.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.
Potentially problematic release.
This version of wbcrm might be problematic. Click here for more details.
wbcrm/models/activities.py
CHANGED
|
@@ -53,10 +53,10 @@ from wbcore.utils.models import (
|
|
|
53
53
|
ComplexToStringMixin,
|
|
54
54
|
DefaultMixin,
|
|
55
55
|
)
|
|
56
|
+
from wbhuman_resources.signals import add_employee_activity_to_daily_brief
|
|
56
57
|
|
|
57
58
|
from wbcrm.models.llm.activity_summaries import analyze_activity
|
|
58
59
|
from wbcrm.models.recurrence import Recurrence
|
|
59
|
-
from wbcrm.signals import add_employee_activity_to_daily_brief
|
|
60
60
|
from wbcrm.synchronization.activity.shortcuts import get_backend
|
|
61
61
|
from wbcrm.typings import Activity as ActivityDTO
|
|
62
62
|
from wbcrm.typings import ParticipantStatus as ParticipantStatusDTO
|
|
@@ -1405,7 +1405,6 @@ def daily_activity_summary(sender, instance: Person, val_date: date, **kwargs) -
|
|
|
1405
1405
|
|
|
1406
1406
|
# Create the formatted activity dictionaries
|
|
1407
1407
|
activity_list = []
|
|
1408
|
-
message = ""
|
|
1409
1408
|
for activity in activity_qs:
|
|
1410
1409
|
activity_list.append(
|
|
1411
1410
|
{
|
|
@@ -1417,6 +1416,4 @@ def daily_activity_summary(sender, instance: Person, val_date: date, **kwargs) -
|
|
|
1417
1416
|
}
|
|
1418
1417
|
)
|
|
1419
1418
|
if activity_list:
|
|
1420
|
-
|
|
1421
|
-
message = render_to_string("email/daily_summary.html", context)
|
|
1422
|
-
return "Daily Activity Summary", message
|
|
1419
|
+
return "Daily Activity Summary", render_to_string("email/daily_summary.html", {"activities": activity_list})
|
wbcrm/tasks.py
CHANGED
|
@@ -29,7 +29,6 @@ from wbcore.contrib.directory.models import Company, Person
|
|
|
29
29
|
from wbcore.contrib.notifications.dispatch import send_notification
|
|
30
30
|
|
|
31
31
|
from wbcrm.models import Activity, ActivityType
|
|
32
|
-
from wbcrm.signals import add_employee_activity_to_daily_brief
|
|
33
32
|
|
|
34
33
|
logger = logging.getLogger()
|
|
35
34
|
User = get_user_model()
|
|
@@ -158,33 +157,6 @@ def yesterdays_activity_summary(yesterday: date | None = None, report_receiver_u
|
|
|
158
157
|
)
|
|
159
158
|
|
|
160
159
|
|
|
161
|
-
@shared_task
|
|
162
|
-
def daily_brief(today: date | None = None, **kwargs):
|
|
163
|
-
"""Creates a summary of the daily brief for all internal employees
|
|
164
|
-
Args:
|
|
165
|
-
today (date | None, optional): Date of today. Defaults to None.
|
|
166
|
-
"""
|
|
167
|
-
|
|
168
|
-
if not today:
|
|
169
|
-
today = date.today()
|
|
170
|
-
for employee in Person.objects.filter_only_internal():
|
|
171
|
-
daily_brief = ""
|
|
172
|
-
for receiver, res in add_employee_activity_to_daily_brief.send( # noqa: B007
|
|
173
|
-
sender=Person, instance=employee, val_date=today, **kwargs
|
|
174
|
-
):
|
|
175
|
-
if res:
|
|
176
|
-
title, html = res
|
|
177
|
-
daily_brief += f"<h2 text-align: center;>{title}</h2>\n<div style='margin-bottom: 1.5em; text-align: left;'>{html}</div>\n"
|
|
178
|
-
|
|
179
|
-
if daily_brief:
|
|
180
|
-
send_notification(
|
|
181
|
-
code="wbcrm.activity.daily_brief",
|
|
182
|
-
title=_("Your Daily Brief"),
|
|
183
|
-
body=daily_brief,
|
|
184
|
-
user=employee.user_account,
|
|
185
|
-
)
|
|
186
|
-
|
|
187
|
-
|
|
188
160
|
@shared_task
|
|
189
161
|
def finish(now: datetime | None = None):
|
|
190
162
|
"""Cron task running every X Seconds. Checks all activities that have finished and sends a reminder to review the activity to the assigned person.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wbcrm
|
|
3
|
-
Version: 1.56.
|
|
3
|
+
Version: 1.56.4
|
|
4
4
|
Summary: A workbench module that contains all the functionality related to a customer relationship management.
|
|
5
5
|
Author-email: Christopher Wittlinger <c.wittlinger@stainly.com>
|
|
6
6
|
Requires-Dist: django-eventtools==1.*
|
|
@@ -2,8 +2,7 @@ wbcrm/__init__.py,sha256=J-j-u0itpEFT6irdmWmixQqYMadNl1X91TxUmoiLHMI,22
|
|
|
2
2
|
wbcrm/apps.py,sha256=gT5ZryLzvq-ftpU48IzzQWM5XKn608lHwao7gCZW0Og,85
|
|
3
3
|
wbcrm/dynamic_preferences_registry.py,sha256=Vy4VSfbHoZnQ71gdEMpZEz-mKWvmTGZfb1eO-UVBqo8,1490
|
|
4
4
|
wbcrm/preferences.py,sha256=BhM_lWfFMZLhP3D1dE7Ja6ZXo-sF3q_YTyJtYkhPqxM,485
|
|
5
|
-
wbcrm/
|
|
6
|
-
wbcrm/tasks.py,sha256=soHEceboaztn8FguUb14HHiZPozZZJfH-NaklMY0kHM,12219
|
|
5
|
+
wbcrm/tasks.py,sha256=7anbjqegviYkhsjbcewGdr3Hwfr4e4x1iQylzDxx-yg,11188
|
|
7
6
|
wbcrm/typings.py,sha256=jMX666cYItSYHN9Cb55HoffyPRG49S1dh6xB8AZpBtE,3312
|
|
8
7
|
wbcrm/urls.py,sha256=5_b4mYUy76KOgSEJL2ggnEnxZpEK7jFzQAAckLNOcxE,2573
|
|
9
8
|
wbcrm/admin/__init__.py,sha256=P_r2hm3DjYhVik8j5t-bT2qJgi6ExMQ0Afg3BnLZ5yc,227
|
|
@@ -55,7 +54,7 @@ wbcrm/migrations/0018_activity_search_vector.py,sha256=34Bh6wy8mR3R3rQl6XJL8813y
|
|
|
55
54
|
wbcrm/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
56
55
|
wbcrm/models/__init__.py,sha256=23U2eBeZStYgUKSGfi3q88JtfqfbNTk7MbnLEAGw1gk,287
|
|
57
56
|
wbcrm/models/accounts.py,sha256=Stqn4NIzCS7fxHmVkHea2fA6rL_ng3nrES804al3n88,25421
|
|
58
|
-
wbcrm/models/activities.py,sha256=
|
|
57
|
+
wbcrm/models/activities.py,sha256=2ADZ60HFqewM43EJY7a_n8rP_i1TA5cIb3wNoMfc0Q8,57340
|
|
59
58
|
wbcrm/models/events.py,sha256=JuGfmMZOVoszK3C6uHUVEWXNOUh8xOnoZAteCPRTAPM,452
|
|
60
59
|
wbcrm/models/groups.py,sha256=att5YADwTLoI5NmSoiMhOBJ8qyBbdKubPGMI2dXUCf0,4345
|
|
61
60
|
wbcrm/models/products.py,sha256=iz6eGDvZEglieWUJDpTAJwHEJLu_rXg_ciGx32haVSk,2553
|
|
@@ -178,6 +177,6 @@ wbcrm/viewsets/titles/products.py,sha256=cFAK5zljjybabk2U0KzPT2PVfV5vmO_UlJd6QlI
|
|
|
178
177
|
wbcrm/viewsets/titles/utils.py,sha256=IaHQTmEG2OwIHS1bRv7sjuT950wefUJNi3yvPdrpNEs,1144
|
|
179
178
|
wbcrm/workflows/__init__.py,sha256=biwXXPkVJugT9Vc1cwbInAUY8EnVmOauxdPz7e_2w_A,32
|
|
180
179
|
wbcrm/workflows/assignee_methods.py,sha256=xlCMnY07TVtVt1pqotARLKtYulQIY4qxdCXrbzP9lig,987
|
|
181
|
-
wbcrm-1.56.
|
|
182
|
-
wbcrm-1.56.
|
|
183
|
-
wbcrm-1.56.
|
|
180
|
+
wbcrm-1.56.4.dist-info/METADATA,sha256=3SV5AtsS9eLatt2H84HQ2c9p_mJXAQwEftb-g8y2bOM,450
|
|
181
|
+
wbcrm-1.56.4.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
|
|
182
|
+
wbcrm-1.56.4.dist-info/RECORD,,
|
wbcrm/signals.py
DELETED
|
File without changes
|