Merge pull request 'uom car service create' (#223) from frontend into main

Reviewed-on: #223
This commit is contained in:
ismail 2025-09-03 14:23:33 +03:00
commit 011026eebb
9 changed files with 16 additions and 15 deletions

View File

@ -162,7 +162,8 @@ def create_ledger_entity(sender, instance, created, **kwargs):
if coa:
# Create essential UOMs synchronously
entity.create_uom(name="Unit", unit_abbr="unit")
for u in models.UnitOfMeasure.choices:
entity.create_uom(name=u[1], unit_abbr=u[0])
# Schedule async task after successful synchronous operations
async_task(

View File

@ -8217,7 +8217,7 @@ We look forward to hearing from you and hopefully moving forward with your proje
Best regards,
{dealer.get_local_name}
{dealer.get_local_name()}
{dealer.phone_number}
Haikal
"""
@ -10958,7 +10958,7 @@ def upload_cars(request, dealer_slug, pk=None):
logger.info(
f"User {user_username} updated PoItemsUploaded status to 'uploaded' for Item PK: {item.pk}."
)
return redirect("inventory_stats", kwargs={"dealer_slug": dealer_slug})
return redirect("home")
# --- Log for successful CSV import and car creation ---
logger.info(
f"User {user_username} successfully imported {cars_created} cars "

View File

@ -243,7 +243,7 @@
aria-selected="false"
tabindex="-1"> <span class="fa-solid fa-clipboard me-2 tab-icon-color fs-8"></span>{{ _("Notes") }}</a>
</li>
<li class="nav-item text-nowrap me-2" role="presentation">
{% comment %} <li class="nav-item text-nowrap me-2" role="presentation">
<a class="nav-link"
id="emails-tab"
data-bs-toggle="tab"
@ -251,7 +251,7 @@
role="tab"
aria-controls="tab-emails"
aria-selected="true"> <span class="fa-solid fa-envelope me-2 tab-icon-color fs-8"></span>{{ _("Emails") }}</a>
</li>
</li> {% endcomment %}
<li class="nav-item text-nowrap me-2" role="presentation">
<a class="nav-link"
id="activity-tab"

View File

@ -512,7 +512,7 @@
{% comment %} <li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link" id="meeting-tab" data-bs-toggle="tab" href="#tab-meeting" role="tab" aria-controls="tab-meeting" aria-selected="true"> <span class="fa-solid fa-video me-2 tab-icon-color"></span>{{ _("Meetings") }}</a></li> {% endcomment %}
{% comment %} <li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link" id="task-tab" data-bs-toggle="tab" href="#tab-task" role="tab" aria-controls="tab-task" aria-selected="true"> <span class="fa-solid fa-square-check me-2 tab-icon-color"></span>Task</a></li> {% endcomment %}
{% comment %} <li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link" id="call-tab" data-bs-toggle="tab" href="#tab-call" role="tab" aria-controls="tab-call" aria-selected="true"> <span class="fa-solid fa-phone me-2 tab-icon-color"></span>{{ _("Calls") }}</a></li> {% endcomment %}
<li class="nav-item text-nowrap me-2" role="presentation">
{% comment %} <li class="nav-item text-nowrap me-2" role="presentation">
<a class="nav-link"
id="emails-tab"
data-bs-toggle="tab"
@ -520,7 +520,7 @@
role="tab"
aria-controls="tab-emails"
aria-selected="true"> <span class="fa-solid fa-envelope me-2 tab-icon-color"></span>{{ _("Emails") }} </a>
</li>
</li> {% endcomment %}
<li class="nav-item text-nowrap me-2" role="presentation">
<a class="nav-link"
id="activity-tab"

View File

@ -488,7 +488,7 @@
{% if request.user.is_authenticated %}
<div class="navbar-logo">
<div class="d-flex align-items-center">
{% with name_to_display=request.user.first_name|default:request.dealer.name %}
{% with name_to_display=request.user.staff.first_name|default:request.dealer.name %}
<h6 class="text-gray-600 ms-2 d-none d-sm-block fs-8"
data-bs-toggle="tooltip"
data-bs-placement="bottom"

View File

@ -269,7 +269,7 @@
</tr>
<tr>
{% if perms.inventory.add_car%}
{% if perms.django_ledger.view_ledgermodel %}
<td colspan="2">
{% if not car.get_transfer %}
<a href="{% url 'car_finance_update' request.dealer.slug car.slug %}"

View File

@ -51,9 +51,9 @@
href="{% url 'item_expense_update' request.dealer.slug expense.pk %}">
<i class="fa fa-edit me-2"></i>{% trans "Update" %}
</a>
<a class="text-danger dropdown-item" href="#">
{% comment %} <a class="text-danger dropdown-item" href="#">
<i class="fa fa-trash me-2"></i>{% trans "Delete" %}
</a>
</a> {% endcomment %}
</div>
</div>
{% endif %}

View File

@ -54,9 +54,9 @@
href="{% url 'item_service_update' request.dealer.slug service.pk %}">
<i class="fa fa-edit me-2"></i>{% trans "Update" %}
</a>
<a class="text-danger dropdown-item" href="#">
{% comment %} <a class="text-danger dropdown-item" href="#">
<i class="fa fa-trash me-2"></i>{% trans "Delete" %}
</a>
</a> {% endcomment %}
</div>
</div>
{% endif %}

View File

@ -52,9 +52,9 @@
href="{% url 'bank_account_update' request.dealer.slug bank.pk %}">
<i class="fa fa-edit me-2"></i>{% trans "Update" %}
</a>
<a class="text-danger dropdown-item" href="#">
{% comment %} <a class="text-danger dropdown-item" href="#">
<i class="fa fa-trash me-2"></i>{% trans "Delete" %}
</a>
</a> {% endcomment %}
</div>
{% endif %}
</td>