From 3e2af239e440c55cb65544be9dc97dd561a27d6c Mon Sep 17 00:00:00 2001 From: gitea Date: Mon, 17 Feb 2025 16:13:28 +0000 Subject: [PATCH] update --- inventory/signals.py | 11 +++++------ templates/inventory/car_detail.html | 27 +++++++++++++++++++++------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/inventory/signals.py b/inventory/signals.py index 119255e2..bbc44a46 100644 --- a/inventory/signals.py +++ b/inventory/signals.py @@ -648,9 +648,10 @@ def create_customer_user(sender, instance, created, **kwargs): username=instance.email, email=instance.email, ) - customer_info = instance.additional_info.get("customer_info",None) - user.first_name = customer_info.get("first_name", None) if customer_info else "" - user.last_name = customer_info.get("last_name", None) if customer_info else "" + instance.additional_info["customer_info"] = to_dict(instance) + # customer_info = instance.additional_info.get("customer_info",None) + # user.first_name = customer_info.get("first_name", None) if customer_info else "" + # user.last_name = customer_info.get("last_name", None) if customer_info else "" user.set_unusable_password() user.save() @@ -862,6 +863,4 @@ def create_activity_on_schedule_creation(sender, instance, created, **kwargs): activity_type='Schedule Created', created_by=instance.scheduled_by.user, notes=f"New schedule created for {instance.purpose} with {instance.lead.full_name} on {instance.scheduled_at}." - ) - - + ) \ No newline at end of file diff --git a/templates/inventory/car_detail.html b/templates/inventory/car_detail.html index 2c0fea4d..8e089c74 100644 --- a/templates/inventory/car_detail.html +++ b/templates/inventory/car_detail.html @@ -1,6 +1,14 @@ {% extends 'base.html' %} {% load i18n static custom_filters %} {% block title %}{{ _("Car Details") }}{% endblock %} +{% block customCSS %} + +{% endblock customCSS %} {% block content %} @@ -11,10 +19,17 @@ {% endif %} - {% if car.get_transfer %} -