From b33d928bccbc244be428f432f52f9135cceb0256 Mon Sep 17 00:00:00 2001 From: Faheedkhan Date: Mon, 7 Jul 2025 13:58:55 +0300 Subject: [PATCH] update --- inventory/models.py | 8 +++++--- inventory/views.py | 1 - templates/bill/bill_detail.html | 4 ++++ templates/bill/includes/card_bill.html | 4 ++-- templates/crm/leads/lead_detail.html | 2 +- templates/ledger/bank_accounts/bank_account_detail.html | 4 ++++ templates/ledger/coa_accounts/account_detail.html | 8 +++++++- templates/ledger/coa_accounts/account_list.html | 4 ++++ 8 files changed, 27 insertions(+), 8 deletions(-) diff --git a/inventory/models.py b/inventory/models.py index 9a04991f..96459291 100644 --- a/inventory/models.py +++ b/inventory/models.py @@ -2662,11 +2662,12 @@ class CustomGroup(models.Model): "staff", "schedule", "activity", + "lead", "opportunity", "customer", "organization", "notes", - "taska", + "tasks", "activity", ], other_perms=[ @@ -2692,7 +2693,8 @@ class CustomGroup(models.Model): "carfinance", "notes", "tasks", - "activity",], + "activity", + "vendor"], other_perms=[ "view_car", "view_carlocation", @@ -2713,11 +2715,11 @@ class CustomGroup(models.Model): "itemmodel", "invoicemodel", "vendormodel", + "journalentrymodel", "purchaseordermodel", "estimatemodel", "customermodel", - "vendormodel", "ledgermodel", "transactionmodel" ], diff --git a/inventory/views.py b/inventory/views.py index cf2dd08a..d79db58d 100644 --- a/inventory/views.py +++ b/inventory/views.py @@ -10234,7 +10234,6 @@ class BillModelActionForceMigrateView(BaseBillActionView): @login_required -@permission_required("inventory.view_poitemsuploaded", raise_exception=True) def view_items_inventory(request, dealer_slug, entity_slug, po_pk): get_object_or_404(models.Dealer, slug=dealer_slug) po = PurchaseOrderModel.objects.get(pk=po_pk) diff --git a/templates/bill/bill_detail.html b/templates/bill/bill_detail.html index 56e78a9e..0ecab405 100644 --- a/templates/bill/bill_detail.html +++ b/templates/bill/bill_detail.html @@ -184,10 +184,12 @@ {% if bill_item.po_model_id %} + {% if perms.django_ledger.view_purchaseordermodel%} {% trans 'View PO' %} + {% endif %} {% endif %} @@ -231,9 +233,11 @@
{% trans 'Bill Notes' %}
+ {% if perms.django_ledger.change_billmodel%}
{% include 'bill/includes/card_markdown.html' with style='card_1' title='' notes_html=bill.notes_html %}
+ {% endif %} diff --git a/templates/bill/includes/card_bill.html b/templates/bill/includes/card_bill.html index c50c4a24..bb799424 100644 --- a/templates/bill/includes/card_bill.html +++ b/templates/bill/includes/card_bill.html @@ -207,7 +207,7 @@ {% if perms.django_ledger.change_billmodel%} {% trans 'Update' %} - + {% if bill.can_draft %} {% endif %} diff --git a/templates/ledger/bank_accounts/bank_account_detail.html b/templates/ledger/bank_accounts/bank_account_detail.html index 75d68280..3513577b 100644 --- a/templates/ledger/bank_accounts/bank_account_detail.html +++ b/templates/ledger/bank_accounts/bank_account_detail.html @@ -52,16 +52,20 @@
+ {% if perms.django_ledger.change_chartofaccountmodel%} {{ _('Edit') }} + {% endif %} + {% if perms.django_ledger.delete_chartofaccountmodel%} {{ _('Delete') }} + {% endif%} - {% trans 'Back to List' %} + {% trans 'Back to COA List' %}
diff --git a/templates/ledger/coa_accounts/account_list.html b/templates/ledger/coa_accounts/account_list.html index bc688690..6923a48f 100644 --- a/templates/ledger/coa_accounts/account_list.html +++ b/templates/ledger/coa_accounts/account_list.html @@ -11,7 +11,9 @@

{% trans "Accounts" %}

+ {% if perms.django_ledger.create_chartofaccountmodel %} {% trans 'New Account' %} + {% endif %}
@@ -105,10 +107,12 @@