Compare commits

..

No commits in common. "296b3911c0159c2cb42fbe29a421616fa67af375" and "7a0079e25d908bf3e253a127847065534e46f47c" have entirely different histories.

4 changed files with 38 additions and 35 deletions

View File

@ -2003,7 +2003,7 @@ class Lead(models.Model):
.first() .first()
) )
def get_absolute_url(self): def get_absolute_url(self):
return reverse("lead_detail", args=[self.dealer.slug,self.slug]) return reverse("lead_detail", args=[self.slug])
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
if not self.slug: if not self.slug:

View File

@ -6031,7 +6031,7 @@ def lead_create(request, dealer_slug):
f"lead created successfully for dealer {dealer_slug} by user:{user_username}" f"lead created successfully for dealer {dealer_slug} by user:{user_username}"
) )
messages.success(request, _("Lead created successfully")) messages.success(request, _("Lead created successfully"))
return redirect("lead_detail",dealer_slug=dealer_slug,slug=instance.slug) return redirect("lead_list", dealer_slug=dealer.slug)
else: else:
logger.error( logger.error(
f"error creating leading for dealer {dealer_slug} by user:{user_username}" f"error creating leading for dealer {dealer_slug} by user:{user_username}"

View File

@ -268,7 +268,7 @@
<th>{% trans "Marked Price"|capfirst %}</th> <th>{% trans "Marked Price"|capfirst %}</th>
<td>{{ car.finances.marked_price|floatformat:2 }}</td> <td>{{ car.finances.marked_price|floatformat:2 }}</td>
</tr> </tr>
{% comment %} <tr> <tr>
<th>{% trans "Selling Price"|capfirst %}</th> <th>{% trans "Selling Price"|capfirst %}</th>
<td>{{ car.finances.selling_price|floatformat:2 }}</td> <td>{{ car.finances.selling_price|floatformat:2 }}</td>
</tr> </tr>
@ -295,7 +295,7 @@
<tr> <tr>
<th>{% trans "Total"|capfirst %}</th> <th>{% trans "Total"|capfirst %}</th>
<td>{{ car.finances.total_vat|floatformat:2 }}</td> <td>{{ car.finances.total_vat|floatformat:2 }}</td>
</tr> {% endcomment %} </tr>
{% if perms.inventory.change_carfinance %} {% if perms.inventory.change_carfinance %}
<tr> <tr>
<td colspan="2"> <td colspan="2">

View File

@ -181,6 +181,7 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
</div> </div>
<hr class="my-2"> <hr class="my-2">
<div class="d-grid gap-2 d-md-flex justify-content-md-center mt-3"> <div class="d-grid gap-2 d-md-flex justify-content-md-center mt-3">
@ -188,11 +189,12 @@
<a href="{% url 'estimate_list' request.dealer.slug%}" class="btn btn-lg btn-phoenix-secondary"><i class="fa-solid fa-ban me-1"></i>{% trans "Cancel" %}</a> <a href="{% url 'estimate_list' request.dealer.slug%}" class="btn btn-lg btn-phoenix-secondary"><i class="fa-solid fa-ban me-1"></i>{% trans "Cancel" %}</a>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}
{% block customJS %} {% block customJS %}
@ -428,4 +430,5 @@ function handleFormResponse(data) {
} }
} }
</script> </script>
{% endblock %} {% endblock %}