uom car service create

This commit is contained in:
Faheedkhan 2025-09-02 19:39:47 +03:00
parent 8afac7e97d
commit 42c3cef6ae
3 changed files with 4 additions and 3 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

@ -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

@ -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 %}"