diff --git a/inventory/views.py b/inventory/views.py index 8187c6f4..a829429c 100644 --- a/inventory/views.py +++ b/inventory/views.py @@ -6778,8 +6778,10 @@ def delete_note(request, dealer_slug, pk): """ try: note = get_object_or_404(models.Notes, pk=pk, created_by=request.user) - print(note) - if isinstance(note.content_object, models.Lead): + if isinstance(note.content_object, models.Customer): + url = "customer_detail" + slug = note.content_object.slug + elif isinstance(note.content_object, models.Lead): url = "lead_detail" slug = note.content_object.slug if hasattr(note.content_object, "opportunity"): diff --git a/requirements.txt b/requirements.txt index 6b99c8eb..91112eb4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,162 +1,374 @@ +aiofiles==24.1.0 +aiohappyeyeballs==2.6.1 +aiohttp==3.11.14 +aiohttp-retry==2.9.1 +aiosignal==1.3.2 +alabaster==1.0.0 +albucore==0.0.23 +albumentations==2.0.5 annotated-types==0.7.0 anyio==4.9.0 +arabic-reshaper==3.0.0 arrow==1.3.0 asgiref==3.9.1 +astor==0.8.1 +astroid==3.3.9 attrs==25.3.0 -autobahn==24.4.2 -Automat==25.4.16 +autopep8==2.3.2 Babel==2.15.0 beautifulsoup4==4.13.4 +bidict==0.23.1 +binaryornot==0.4.4 +bleach==6.2.0 blessed==1.21.0 +blinker==1.9.0 +Brotli==1.1.0 cattrs==25.1.1 certifi==2025.7.9 cffi==1.17.1 -channels==4.2.2 +chardet==5.2.0 charset-normalizer==3.4.2 click==8.2.1 colorama==0.4.6 -constantly==23.10.4 +commonmark==0.9.1 +contourpy==1.3.1 +cookiecutter==2.6.0 crispy-bootstrap5==2025.6 cryptography==45.0.5 cssbeautifier==1.15.4 -daphne==4.2.1 +cssselect2==0.8.0 +cycler==0.12.1 +Cython==3.0.12 +datastar-py==0.6.2 +decorator==5.2.1 defusedxml==0.7.1 +desert==2020.11.18 diff-match-patch==20241021 +dill==0.3.9 +distlib==0.3.9 distro==1.9.0 +dj-rest-auth==7.0.1 +dj-shop-cart==7.1.1 Django==5.2.4 +django-admin-sortable2==1.0.4 django-allauth==65.10.0 +django-angular==2.3.1 django-appconf==1.1.0 django-appointment==3.8.0 django-background-tasks==1.2.8 django-bootstrap5==25.1 django-ckeditor==6.7.3 +django-classy-tags==3.0.1 +django-cms==3.11.3 django-cors-headers==4.7.0 django-countries==7.6.1 django-crispy-forms==2.4 django-debug-toolbar==5.2.0 django-easy-audit==1.3.7 django-encrypted-model-fields==0.6.5 +django-entangled==0.6.2 django-extensions==4.1 +django-extra-views==0.14.0 +django-filer==3.0.3 django-filter==25.1 +django-formtools==2.4 +django-fsm==3.0.0 +django-fsm-admin==1.2.5 +django-haystack==3.3.0 django-imagekit==5.0.0 django-import-export==4.3.8 +django-ipware==7.0.1 django-js-asset==3.1.2 django-ledger==0.7.6.1 django-manager-utils==3.1.5 +django-model-utils==5.0.0 +django-money==3.5.3 django-next-url-mixin==0.4.0 +django-nine==0.2.7 +django-nonefield==0.4 django-ordered-model==3.7.4 +django-oscar==3.2.5 +django-pdf-actions==0.1.44 django-phonenumber-field==8.0.0 django-picklefield==3.3 django-plans==2.0.0 -django-prometheus==2.4.1 +django-polymorphic==3.1.0 +django-post-office==3.6.3 +django-prometheus==2.3.1 django-q2==1.8.0 django-query-builder==3.2.0 +django-rest-auth==0.9.5 django-schema-graph==3.1.0 +django-sekizai==3.0.1 +django-select2==7.10.0 django-sequences==3.0 +django-shop==1.2.4 +django-silk==5.3.2 +django-sms==0.7.0 +django-sslserver==0.22 django-tables2==2.7.5 +django-tailwind==4.0.1 django-treebeard==4.7.1 +django-view-breadcrumbs==2.5.1 +django-viewflow==2.2.12 django-widget-tweaks==1.5.0 +djangocms-admin-style==3.3.1 +djangocms-cascade==1.3.7 +djangocms-text-ckeditor==5.1.7 djangorestframework==3.16.0 +djangorestframework_simplejwt==5.5.0 +djangoviz==0.1.1 djhtml==3.0.8 djlint==1.36.4 -dnspython==2.7.0 docopt==0.6.2 +docutils==0.21.2 +easy-thumbnails==2.9 +ecdsa==0.19.1 EditorConfig==0.17.1 +emoji==2.14.1 +et_xmlfile==2.0.0 +factory-boy==3.2.1 Faker==37.4.0 +fastapi==0.115.12 +filelock==3.18.0 +fire==0.7.0 fleming==0.7.0 fonttools==4.58.5 fpdf==1.7.2 fpdf2==2.8.3 +frozenlist==1.5.0 +fsspec==2025.3.0 +gprof2dot==2024.6.6 +graphqlclient==0.2.4 greenlet==3.2.3 -gunicorn==23.0.0 h11==0.16.0 h2==4.2.0 hpack==4.1.0 +hstspreload==2025.1.1 +html5lib==1.1 +htmx==0.0.0 httpcore==1.0.9 +httptools==0.6.4 httpx==0.28.1 +httpx-ws==0.7.2 hyperframe==6.1.0 -hyperlink==21.0.0 icalendar==6.3.1 idna==3.10 -incremental==24.7.2 -iron-core==1.2.1 -iron-mq==0.9 +ifaddr==0.2.0 +imageio==2.37.0 +imagesize==1.4.1 +imgaug==0.4.0 +iso4217==1.12.20240625 +isodate==0.7.2 +isort==6.0.1 +itsdangerous==2.2.0 +Jinja2==3.1.6 jiter==0.10.0 +joblib==1.4.2 jsbeautifier==1.15.4 json5==0.12.0 +jsonfield==3.1.0 jsonpatch==1.33 jsonpointer==3.0.0 jwt==1.4.0 +kiwisolver==1.4.8 langchain==0.3.26 langchain-core==0.3.68 langchain-ollama==0.3.4 langchain-text-splitters==0.3.8 langsmith==0.4.4 +lazy_loader==0.4 +ledger==1.0.1 +libretranslatepy==2.1.4 +lmdb==1.6.2 +lmstudio==1.4.1 luhnchecker==0.0.12 +lxml==5.3.1 Markdown==3.8.2 markdown-it-py==3.0.0 +markdown2==2.5.3 +MarkupSafe==3.0.2 +marshmallow==3.26.1 +matplotlib==3.10.1 +mccabe==0.7.0 mdurl==0.1.2 +MouseInfo==0.1.3 +mpmath==1.3.0 +msgspec==0.19.0 +multidict==6.2.0 +mypy-extensions==1.0.0 +networkx==3.4.2 +newrelic==10.7.0 +nicegui==2.13.0 +nltk==3.9.1 num2words==0.5.14 numpy==2.3.1 +nvidia-cublas-cu12==12.4.5.8 +nvidia-cuda-cupti-cu12==12.4.127 +nvidia-cuda-nvrtc-cu12==12.4.127 +nvidia-cuda-runtime-cu12==12.4.127 +nvidia-cudnn-cu12==9.1.0.70 +nvidia-cufft-cu12==11.2.1.3 +nvidia-curand-cu12==10.3.5.147 +nvidia-cusolver-cu12==11.6.1.9 +nvidia-cusparse-cu12==12.3.1.170 +nvidia-cusparselt-cu12==0.6.2 +nvidia-nccl-cu12==2.21.5 +nvidia-nvjitlink-cu12==12.4.127 +nvidia-nvtx-cu12==12.4.127 +oauthlib==3.2.2 ofxtools==0.9.5 ollama==0.5.1 openai==1.93.3 +opencv-contrib-python==4.11.0.86 opencv-python==4.11.0.86 +opencv-python-headless==4.11.0.86 +openpyxl==3.1.5 +opt_einsum==3.4.0 orjson==3.10.18 +outcome==1.3.0.post0 packaging==24.2 pandas==2.3.1 +pango==0.0.1 +passlib==1.7.4 pathspec==0.12.1 +pdfkit==1.0.0 phonenumbers==8.13.42 pilkit==3.0 pillow==10.4.0 -priority==1.3.0 -prometheus_client==0.22.1 +pipenv==2024.4.1 +platformdirs==4.3.7 +prometheus_client==0.21.1 +propcache==0.3.0 +protobuf==6.30.1 +pscript==0.7.7 +psycopg-binary==3.2.6 psycopg2-binary==2.9.10 +purl==1.6 +py-moneyed==3.0 pyasn1==0.6.1 -pyasn1_modules==0.4.2 +PyAutoGUI==0.9.54 +pyclipper==1.3.0.post6 +pycodestyle==2.12.1 +pycountry==24.6.1 pycparser==2.22 pydantic==2.11.7 pydantic_core==2.33.2 +pydotplus==2.0.2 +pydyf==0.11.0 +PyGetWindow==0.0.9 Pygments==2.19.2 -pymongo==4.14.1 -pyOpenSSL==25.1.0 +PyJWT==2.9.0 +pylint==3.3.5 +PyMsgBox==1.0.9 +pyparsing==3.2.1 +pypdf==5.4.0 +PyPDF2==3.0.1 +pyperclip==1.9.0 +pyphen==0.17.2 +pypng==0.20220715.0 +PyRect==0.2.0 +PyScreeze==1.0.1 +pyserial==3.5 +PySocks==1.7.1 +python-bidi==0.6.6 python-dateutil==2.9.0.post0 -python-dotenv==1.1.1 +python-docx==1.1.2 +python-dotenv==1.0.1 +python-engineio==4.11.2 +python-ipware==3.0.0 +python-jose==3.5.0 +python-multipart==0.0.20 +python-openid==2.2.5 python-slugify==8.0.4 +python-socketio==5.12.1 python-stdnum==2.1 +python3-saml==1.16.0 +python3-xlib==0.15 +pytweening==1.2.0 pytz==2025.2 pyvin==0.0.2 PyYAML==6.0.2 pyzbar==0.1.9 +qrcode==8.0 +RapidFuzz==3.12.2 redis==6.2.0 regex==2024.11.6 +reportlab==4.3.1 requests==2.32.4 +requests-oauthlib==2.0.0 requests-toolbelt==1.0.0 +rfc3986==2.0.0 rich==14.0.0 +rsa==4.9.1 +rubicon-objc==0.5.0 ruff==0.12.2 -service-identity==24.2.0 +sacremoses==0.1.1 +scikit-image==0.25.2 +scikit-learn==1.6.1 +scipy==1.15.2 +selenium==4.29.0 +sentencepiece==0.2.0 setuptools==80.9.0 +shapely==2.0.7 +simple-websocket==1.1.0 +simsimd==6.2.1 six==1.17.0 sniffio==1.3.1 +snowballstemmer==2.2.0 +sorl-thumbnail==12.9.0 +sortedcontainers==2.4.0 soupsieve==2.7 SQLAlchemy==2.0.41 sqlparse==0.5.3 +stanza==1.10.1 +starlette==0.46.1 +stringzilla==3.12.3 suds==1.2.0 +svglib==1.5.1 swapper==1.3.0 +sympy==1.13.1 tablib==3.8.0 tenacity==9.1.2 +termcolor==2.5.0 text-unidecode==1.3 +threadpoolctl==3.6.0 +tifffile==2025.3.13 +tinycss2==1.4.0 +tinyhtml5==2.0.0 +tomli==2.2.1 +tomlkit==0.13.2 +torch==2.6.0 tqdm==4.67.1 -Twisted==25.5.0 -txaio==25.6.1 +trio==0.29.0 +trio-websocket==0.12.2 +triton==3.2.0 types-python-dateutil==2.9.0.20250708 +typing-inspect==0.9.0 typing-inspection==0.4.1 typing_extensions==4.14.1 tzdata==2025.2 +Unidecode==1.3.8 +upgrade-requirements==1.7.0 urllib3==2.5.0 -uvicorn==0.35.0 -uvicorn-worker==0.3.0 +uv==0.6.14 +uvicorn==0.34.0 +uvloop==0.21.0 +vbuild==0.8.2 +virtualenv==20.30.0 +vishap==0.1.5 +vpic-api==0.7.4 +watchfiles==1.0.4 wcwidth==0.2.13 +weasyprint==64.1 +webencodings==0.5.1 +websocket-client==1.8.0 +websockets==15.0.1 +Werkzeug==3.1.3 whitenoise==6.9.0 -zope.interface==7.2 +wikipedia==1.4.0 +wsproto==1.2.0 +xmlsec==1.3.15 +yarl==1.18.3 +zopfli==0.2.3.post1 zstandard==0.23.0 diff --git a/static/images/customers/3GCNY9EF5LG275234.png b/static/images/customers/3GCNY9EF5LG275234.png new file mode 100644 index 00000000..dccdedef Binary files /dev/null and b/static/images/customers/3GCNY9EF5LG275234.png differ diff --git a/templates/crm/opportunities/opportunity_detail.html b/templates/crm/opportunities/opportunity_detail.html index c208b117..7ad94a70 100644 --- a/templates/crm/opportunities/opportunity_detail.html +++ b/templates/crm/opportunities/opportunity_detail.html @@ -265,74 +265,13 @@ -
-
-
- -
-
-

{{ _("Expected Revenue") }}

-

{{ opportunity.expected_revenue }}

-
-
-
+
-
- - - - - - - - - - - - - - - - -
-
-
- -
-

{% trans "Probability (%)" %}

-
-
: -

{{ opportunity.probability }} (%)

-
-
-
- -
-

{{ _("Estimated Revenue") }}

-
-
: -

- {{ opportunity.expected_revenue }} -

-
-
+
diff --git a/templates/customers/customer_list.html b/templates/customers/customer_list.html index d606b123..9f66149c 100644 --- a/templates/customers/customer_list.html +++ b/templates/customers/customer_list.html @@ -60,17 +60,6 @@ {{ _("Phone Number") }} - diff --git a/templates/customers/view_customer.html b/templates/customers/view_customer.html index 0bc040b6..53da72fe 100644 --- a/templates/customers/view_customer.html +++ b/templates/customers/view_customer.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load humanize %} {% load i18n static crispy_forms_filters custom_filters %} {% block title %} {{ _("View Customer") }} @@ -109,23 +110,50 @@ {% endif %}
-
-
-
- -
- {{ _("National ID") |capfirst }} -
-
{{ customer.phone_number }} - - {{ customer.national_id }} - {{ customer.address }}
- +
+ - - + + + + - + {% for note in notes %} - - - - - {% empty %} - - + + + + {% endfor %}
{% trans 'Note' %}{% trans 'Date' %}{{ _("Note") }}{{ _("Created On") }}{{ _("Last Updated") }}
{{ note.note|default_if_none:""|linebreaksbr }}{{ note.created|date:"d M Y" }}
- {% trans 'No notes found for this customer.' %} +
{{ note.note }}{{ note.created|naturalday|capfirst }}{{ note.updated|naturalday|capfirst }} + {% if note.created_by == request.user %} + + + {{ _("Update") }} + + + {% endif %}