From f777cea2bb4939ed9fbf05e162c486b0f0c4f349 Mon Sep 17 00:00:00 2001 From: gitea Date: Thu, 13 Feb 2025 15:10:25 +0000 Subject: [PATCH] update --- inventory/views.py | 7 +- templates/crm/leads/lead_detail.html | 2 +- .../crm/opportunities/opportunity_detail.html | 98 ++----------------- templates/customers/view_customer.html | 2 +- 4 files changed, 16 insertions(+), 93 deletions(-) diff --git a/inventory/views.py b/inventory/views.py index 6a96e00c..6543bdd8 100644 --- a/inventory/views.py +++ b/inventory/views.py @@ -2718,7 +2718,7 @@ class EstimatePreviewView(DetailView): @login_required def estimate_mark_as(request, pk): estimate = get_object_or_404(EstimateModel, pk=pk) - dealer = get_user_type(request.user) + dealer = get_user_type(request) entity = dealer.entity mark = request.GET.get("mark") if mark: @@ -3450,6 +3450,11 @@ class OpportunityDetailView(DetailView): context["status_form"] = form context["notes"] = models.Notes.objects.filter(content_type__model="opportunity", object_id=self.object.id) context["activities"] = models.Activity.objects.filter(content_type__model="opportunity", object_id=self.object.id) + email_qs = models.Email.objects.filter(content_type__model="opportunity", object_id=self.object.id) + context["emails"] = { + "sent": email_qs.filter(status="SENT"), + "draft": email_qs.filter(status="DRAFT"), + } return context diff --git a/templates/crm/leads/lead_detail.html b/templates/crm/leads/lead_detail.html index 57228dcf..597c0575 100644 --- a/templates/crm/leads/lead_detail.html +++ b/templates/crm/leads/lead_detail.html @@ -128,7 +128,7 @@ -
+

{{ _("Activities") }} ({{ activities.count}})

diff --git a/templates/crm/opportunities/opportunity_detail.html b/templates/crm/opportunities/opportunity_detail.html index 710a1088..df86c495 100644 --- a/templates/crm/opportunities/opportunity_detail.html +++ b/templates/crm/opportunities/opportunity_detail.html @@ -169,10 +169,10 @@
-

{{ _("Revenue") }}

+

{{ _("Estimated Revenue") }}

- : + :{{opportunity.estimate.get_revenue_estimate}}

{{ opportunity.car.finances.revenue }}

@@ -791,104 +791,22 @@ + {% for email in emails.sent %}
- Quary about purchased soccer socks -
jackson@mail.com
+ {{email.subject}} +
{{email.to_email}}
- Jackson Pollock - Dec 29, 2021 10:23 am + {{email.from_email}} + {{email.created}} Call sent - - -
- -
- - How to take the headache out of Order -
ansolo45@mail.com
- - Ansolo Lazinatov - Dec 27, 2021 3:27 pm - Call - delivered - - - -
- -
- - The Arnold Schwarzenegger of Order -
ansolo45@mail.com
- - Ansolo Lazinatov - Dec 24, 2021 10:44 am - Call - Bounce - - - -
- -
- - My order is not being taken -
jackson@mail.com
- - Jackson Pollock - Dec 19, 2021 4:55 pm - Call - Spam - - - -
- -
- - Shipment is missing -
jackson@mail.com
- - Jackson Pollock - Dec 19, 2021 2:43 pm - Call - sent - - - -
- -
- - How can I order something urgently? -
ansolo45@mail.com
- - Jackson Pollock - Dec 19, 2021 2:43 pm - Call - Delivered - - - -
- -
- - How the delicacy of the products will be handled? -
ansolo45@mail.com
- - Ansolo Lazinatov - Dec 16, 2021 5:18 pm - Call - bounced - + {% endfor %}
diff --git a/templates/customers/view_customer.html b/templates/customers/view_customer.html index 0a59e721..cc557b9d 100644 --- a/templates/customers/view_customer.html +++ b/templates/customers/view_customer.html @@ -73,7 +73,7 @@
-
+
{% trans 'Invoices' %}

{{invoices.count}}