diff --git a/apply_initial_migrations.sh b/apply_initial_migrations.sh index 4723d5d6..e6e88a0f 100755 --- a/apply_initial_migrations.sh +++ b/apply_initial_migrations.sh @@ -6,12 +6,16 @@ echo "Delete Old Cache" find ./car_inventory -type d -iname "__pycache__"|xargs rm -rf find ./inventory -type d -iname "__pycache__"|xargs rm -rf + echo "Apply Base Migrate" python3 manage.py migrate -echo "Apply Make Migratinos" + python3 manage.py makemigrations +echo "Apply Appointment Migratinos" +python3 manage.py makemigrations appointment + echo "Apply Final Migrate" python3 manage.py migrate diff --git a/inventory/migrations/0001_initial.py b/inventory/migrations/0001_initial.py index 72926847..a19bf46f 100644 --- a/inventory/migrations/0001_initial.py +++ b/inventory/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 5.1.7 on 2025-05-18 15:52 +# Generated by Django 5.1.7 on 2025-05-19 11:40 import datetime import django.core.validators @@ -330,6 +330,7 @@ class Migration(migrations.Migration): ('logo', models.ImageField(blank=True, null=True, upload_to='logos/users', verbose_name='Logo')), ('joined_at', models.DateTimeField(auto_now_add=True, verbose_name='Joined At')), ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')), + ('slug', models.SlugField(blank=True, max_length=255, null=True, unique=True)), ('entity', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='django_ledger.entitymodel')), ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='dealer', to=settings.AUTH_USER_MODEL)), ], @@ -368,6 +369,7 @@ class Migration(migrations.Migration): ('image', models.ImageField(blank=True, null=True, upload_to='customers/', verbose_name='Image')), ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')), ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')), + ('slug', models.SlugField(blank=True, editable=False, max_length=255, null=True, unique=True)), ('customer_model', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='django_ledger.customermodel')), ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='customer_profile', to=settings.AUTH_USER_MODEL)), ('dealer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customers', to='inventory.dealer')), @@ -429,7 +431,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('object_id', models.PositiveIntegerField()), - ('activity_type', models.CharField(choices=[('call', 'Call'), ('sms', 'SMS'), ('email', 'Email'), ('whatsapp', 'WhatsApp'), ('visit', 'Visit'), ('negotiation', 'Negotiation'), ('follow_up', 'Follow Up'), ('won', 'Won'), ('lost', 'Lost'), ('closed', 'Closed'), ('converted', 'Converted'), ('transfer', 'Transfer'), ('add_car', 'Add Car'), ('sale_car', 'Sale Car'), ('reserve_car', 'Reserve Car'), ('transfer_car', 'Transfer Car'), ('remove_car', 'Remove Car'), ('create_quotation', 'Create Quotation'), ('cancel_quotation', 'Cancel Quotation'), ('create_order', 'Create Order'), ('cancel_order', 'Cancel Order'), ('create_invoice', 'Create Invoice'), ('cancel_invoice', 'Cancel Invoice')], max_length=50, verbose_name='Activity Type')), + ('activity_type', models.CharField(choices=[('call', 'Call'), ('sms', 'SMS'), ('email', 'Email'), ('meeting', 'Meeting'), ('whatsapp', 'WhatsApp'), ('visit', 'Visit'), ('negotiation', 'Negotiation'), ('follow_up', 'Follow Up'), ('won', 'Won'), ('lost', 'Lost'), ('closed', 'Closed'), ('converted', 'Converted'), ('transfer', 'Transfer'), ('add_car', 'Add Car'), ('sale_car', 'Sale Car'), ('reserve_car', 'Reserve Car'), ('transfer_car', 'Transfer Car'), ('remove_car', 'Remove Car'), ('create_quotation', 'Create Quotation'), ('cancel_quotation', 'Cancel Quotation'), ('create_order', 'Create Order'), ('cancel_order', 'Cancel Order'), ('create_invoice', 'Create Invoice'), ('cancel_invoice', 'Cancel Invoice')], max_length=50, verbose_name='Activity Type')), ('notes', models.TextField(blank=True, null=True, verbose_name='Notes')), ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')), ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')), @@ -555,6 +557,7 @@ class Migration(migrations.Migration): ('converted_at', models.DateTimeField(blank=True, null=True)), ('created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Created')), ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')), + ('slug', models.SlugField(blank=True, null=True, unique=True)), ('customer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='customer_leads', to='inventory.customer')), ('dealer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='leads', to='inventory.dealer')), ('id_car_make', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='inventory.carmake', verbose_name='Make')), @@ -748,6 +751,7 @@ class Migration(migrations.Migration): ('address', models.CharField(max_length=200, verbose_name='Address')), ('logo', models.ImageField(blank=True, null=True, upload_to='logos/vendors', verbose_name='Logo')), ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')), + ('slug', models.SlugField(blank=True, max_length=255, null=True, unique=True, verbose_name='Slug')), ('dealer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='vendors', to='inventory.dealer')), ('vendor_model', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='django_ledger.vendormodel', verbose_name='Vendor Model')), ], diff --git a/inventory/migrations/0002_dealer_slug.py b/inventory/migrations/0002_dealer_slug.py deleted file mode 100644 index 85bf7f83..00000000 --- a/inventory/migrations/0002_dealer_slug.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 5.1.7 on 2025-05-18 16:23 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('inventory', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='dealer', - name='slug', - field=models.SlugField(blank=True, max_length=255, null=True, unique=True), - ), - ] diff --git a/inventory/migrations/0003_customer_slug.py b/inventory/migrations/0003_customer_slug.py deleted file mode 100644 index 1fa22a02..00000000 --- a/inventory/migrations/0003_customer_slug.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 5.1.7 on 2025-05-18 16:37 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('inventory', '0002_dealer_slug'), - ] - - operations = [ - migrations.AddField( - model_name='customer', - name='slug', - field=models.SlugField(blank=True, editable=False, max_length=255, null=True, unique=True), - ), - ] diff --git a/inventory/migrations/0004_vendor_slug.py b/inventory/migrations/0004_vendor_slug.py deleted file mode 100644 index d7237ab6..00000000 --- a/inventory/migrations/0004_vendor_slug.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 5.1.7 on 2025-05-18 16:42 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('inventory', '0003_customer_slug'), - ] - - operations = [ - migrations.AddField( - model_name='vendor', - name='slug', - field=models.SlugField(blank=True, max_length=255, null=True, unique=True, verbose_name='Slug'), - ), - ] diff --git a/inventory/migrations/0005_lead_slug.py b/inventory/migrations/0005_lead_slug.py deleted file mode 100644 index 7e6da6ba..00000000 --- a/inventory/migrations/0005_lead_slug.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 5.1.7 on 2025-05-18 16:48 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('inventory', '0004_vendor_slug'), - ] - - operations = [ - migrations.AddField( - model_name='lead', - name='slug', - field=models.SlugField(blank=True, null=True, unique=True), - ), - ] diff --git a/inventory/migrations/0006_alter_activity_activity_type.py b/inventory/migrations/0006_alter_activity_activity_type.py deleted file mode 100644 index cd86d3fa..00000000 --- a/inventory/migrations/0006_alter_activity_activity_type.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 5.1.7 on 2025-05-18 16:58 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('inventory', '0005_lead_slug'), - ] - - operations = [ - migrations.AlterField( - model_name='activity', - name='activity_type', - field=models.CharField(choices=[('call', 'Call'), ('sms', 'SMS'), ('email', 'Email'), ('meeting', 'Meeting'), ('whatsapp', 'WhatsApp'), ('visit', 'Visit'), ('negotiation', 'Negotiation'), ('follow_up', 'Follow Up'), ('won', 'Won'), ('lost', 'Lost'), ('closed', 'Closed'), ('converted', 'Converted'), ('transfer', 'Transfer'), ('add_car', 'Add Car'), ('sale_car', 'Sale Car'), ('reserve_car', 'Reserve Car'), ('transfer_car', 'Transfer Car'), ('remove_car', 'Remove Car'), ('create_quotation', 'Create Quotation'), ('cancel_quotation', 'Cancel Quotation'), ('create_order', 'Create Order'), ('cancel_order', 'Cancel Order'), ('create_invoice', 'Create Invoice'), ('cancel_invoice', 'Cancel Invoice')], max_length=50, verbose_name='Activity Type'), - ), - ] diff --git a/static/images/logos/users/li-yang-5h_dMuX_7RE-unsplash.jpg b/static/images/logos/users/li-yang-5h_dMuX_7RE-unsplash.jpg new file mode 100644 index 00000000..5b273235 Binary files /dev/null and b/static/images/logos/users/li-yang-5h_dMuX_7RE-unsplash.jpg differ diff --git a/staticfiles/images/customers/image_UGmtPMg.png b/staticfiles/images/customers/image_UGmtPMg.png new file mode 100644 index 00000000..fb612b2b Binary files /dev/null and b/staticfiles/images/customers/image_UGmtPMg.png differ diff --git a/staticfiles/images/logos/vendors/logo-for-the-word-daju-48a980_CfNtYr7.jpg b/staticfiles/images/logos/vendors/logo-for-the-word-daju-48a980_CfNtYr7.jpg new file mode 100644 index 00000000..f2cfb1d9 Binary files /dev/null and b/staticfiles/images/logos/vendors/logo-for-the-word-daju-48a980_CfNtYr7.jpg differ diff --git a/templates/crm/leads/lead_form.html b/templates/crm/leads/lead_form.html index 9cbf14b9..db8da5da 100644 --- a/templates/crm/leads/lead_form.html +++ b/templates/crm/leads/lead_form.html @@ -9,14 +9,16 @@
{% csrf_token %} {{ form|crispy }} - - - {{ _("Cancel") }} - +
+ + {% trans "Cancel" %} +
+ {% endblock %} \ No newline at end of file diff --git a/templates/crm/opportunities/opportunity_form.html b/templates/crm/opportunities/opportunity_form.html index 882a0494..f4cd3815 100644 --- a/templates/crm/opportunities/opportunity_form.html +++ b/templates/crm/opportunities/opportunity_form.html @@ -135,13 +135,13 @@
diff --git a/templates/customers/customer_form.html b/templates/customers/customer_form.html index 93cdb37c..3ecab573 100644 --- a/templates/customers/customer_form.html +++ b/templates/customers/customer_form.html @@ -26,12 +26,11 @@ {% csrf_token %} {{ form|crispy }}
- - - {{ _("Cancel") }} - + {% trans "Cancel" %}
diff --git a/templates/inventory/add_colors.html b/templates/inventory/add_colors.html index f3eabfcc..c66cfc03 100644 --- a/templates/inventory/add_colors.html +++ b/templates/inventory/add_colors.html @@ -51,12 +51,30 @@ -
+ {% comment %}
- - {% trans "Cancel" %} + + {% trans "Cancel" %}
+
{% endcomment %} + + + + {% comment %}
+
+
+ + {% trans "Cancel" %} +
+
+
{% endcomment %} + +
+ + {% trans "Cancel" %}
+ +
diff --git a/templates/inventory/car_finance_form.html b/templates/inventory/car_finance_form.html index ffc0957d..0492b80e 100644 --- a/templates/inventory/car_finance_form.html +++ b/templates/inventory/car_finance_form.html @@ -35,13 +35,30 @@ {{ form|crispy }} -
+ {% comment %}
- - {% trans "Cancel" %} + + {% trans "Cancel" %}
+
{% endcomment %} + +
+ + + + {% trans "Cancel" %}
+ + + + + + +
diff --git a/templates/inventory/color_palette.html b/templates/inventory/color_palette.html index 8ee35566..1a94db52 100644 --- a/templates/inventory/color_palette.html +++ b/templates/inventory/color_palette.html @@ -103,9 +103,10 @@
- - {% trans "Cancel" %} + + {% trans "Cancel" %}
+ diff --git a/templates/items/expenses/expense_create.html b/templates/items/expenses/expense_create.html index ab481975..d01b4b45 100644 --- a/templates/items/expenses/expense_create.html +++ b/templates/items/expenses/expense_create.html @@ -13,7 +13,14 @@
{% csrf_token %} {{ form|crispy }} - + + {% comment %} {% endcomment %} + +
+ + {% trans "Cancel" %} +
+
diff --git a/templates/items/expenses/expenses_list.html b/templates/items/expenses/expenses_list.html index 1641921b..ef969958 100644 --- a/templates/items/expenses/expenses_list.html +++ b/templates/items/expenses/expenses_list.html @@ -8,7 +8,8 @@

{% trans "Expenses" %}

- {% trans "Add Expense" %} + {% trans "Add Expense" %} +
diff --git a/templates/items/service/service_create.html b/templates/items/service/service_create.html index a33fa82e..371417c9 100644 --- a/templates/items/service/service_create.html +++ b/templates/items/service/service_create.html @@ -19,7 +19,11 @@
{% csrf_token %} {{ form|crispy }} - +
+ + {% trans "Cancel" %} +
+
diff --git a/templates/items/service/service_list.html b/templates/items/service/service_list.html index 6c671ef5..ad0390b0 100644 --- a/templates/items/service/service_list.html +++ b/templates/items/service/service_list.html @@ -8,7 +8,8 @@

{% trans "Services" %}

- {% trans "Add Service" %} + {% trans "Add Service" %} +
diff --git a/templates/ledger/bank_accounts/bank_account_form.html b/templates/ledger/bank_accounts/bank_account_form.html index f4ee8077..584cd6b0 100644 --- a/templates/ledger/bank_accounts/bank_account_form.html +++ b/templates/ledger/bank_accounts/bank_account_form.html @@ -26,12 +26,12 @@ {% for error in form.errors %}
{{ error }}
{% endfor %} -
- - {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/templates/ledger/bank_accounts/bank_account_list.html b/templates/ledger/bank_accounts/bank_account_list.html index 3bc1ee50..e66a0ed1 100644 --- a/templates/ledger/bank_accounts/bank_account_list.html +++ b/templates/ledger/bank_accounts/bank_account_list.html @@ -8,7 +8,7 @@

{% trans "Bank Accounts" %}

- {% trans "Add Bank Account" %} + {% trans "Add Bank Account" %}
diff --git a/templates/ledger/bills/bill_form.html b/templates/ledger/bills/bill_form.html index 1bcf200a..96f540cf 100644 --- a/templates/ledger/bills/bill_form.html +++ b/templates/ledger/bills/bill_form.html @@ -37,10 +37,12 @@
-
- - {% trans "Cancel" %} + +
+ + {% trans "Cancel" %}
+
{% endblock content %} diff --git a/templates/ledger/bills/bill_list.html b/templates/ledger/bills/bill_list.html index b202f2b9..6299e12f 100644 --- a/templates/ledger/bills/bill_list.html +++ b/templates/ledger/bills/bill_list.html @@ -13,7 +13,7 @@
- + {% trans 'New Bill' %}
diff --git a/templates/ledger/coa_accounts/account_form.html b/templates/ledger/coa_accounts/account_form.html index bc091284..91dbb86f 100644 --- a/templates/ledger/coa_accounts/account_form.html +++ b/templates/ledger/coa_accounts/account_form.html @@ -26,11 +26,15 @@
{{ error }}
{% endfor %}
- - {% trans "Cancel"|capfirst %} + + {% trans "Cancel" %}
+
diff --git a/templates/ledger/coa_accounts/account_list.html b/templates/ledger/coa_accounts/account_list.html index 1a26535e..59f4ab28 100644 --- a/templates/ledger/coa_accounts/account_list.html +++ b/templates/ledger/coa_accounts/account_list.html @@ -13,7 +13,7 @@
- + {% trans 'New Account' %}

diff --git a/templates/ledger/journal_entry/journal_entry_form.html b/templates/ledger/journal_entry/journal_entry_form.html index 69cb8e7d..cc9eeb62 100644 --- a/templates/ledger/journal_entry/journal_entry_form.html +++ b/templates/ledger/journal_entry/journal_entry_form.html @@ -13,8 +13,8 @@ {{ form|crispy }}

- - {% trans "Cancel" %} + + {% trans "Cancel" %}
diff --git a/templates/ledger/ledger/ledger_form.html b/templates/ledger/ledger/ledger_form.html index b059f3f3..0b99fc7b 100644 --- a/templates/ledger/ledger/ledger_form.html +++ b/templates/ledger/ledger/ledger_form.html @@ -12,10 +12,17 @@
{{ form|crispy }}
-
+ {% comment %}
- {% trans "Cancel" %} -
+ {% trans "Cancel" %} +
{% endcomment %} + +
+ + {% trans "Cancel" %} +
+ + {% endblock content %} \ No newline at end of file diff --git a/templates/ledger/ledger/ledger_list.html b/templates/ledger/ledger/ledger_list.html index 46088f18..ff29a128 100644 --- a/templates/ledger/ledger/ledger_list.html +++ b/templates/ledger/ledger/ledger_list.html @@ -10,7 +10,7 @@
- + {% trans 'Create Ledger' %}
diff --git a/templates/organizations/organization_form.html b/templates/organizations/organization_form.html index 5b9b0b17..18735536 100644 --- a/templates/organizations/organization_form.html +++ b/templates/organizations/organization_form.html @@ -12,13 +12,8 @@ {% csrf_token %} {{ redirect_field }} {{ form|crispy }} - - - {% trans "Cancel" %} - + + {% trans "Cancel" %}
diff --git a/templates/sales/estimates/estimate_form.html b/templates/sales/estimates/estimate_form.html index d69e8706..c5b8d197 100644 --- a/templates/sales/estimates/estimate_form.html +++ b/templates/sales/estimates/estimate_form.html @@ -50,21 +50,34 @@
- +
- +
+ -
- - {% trans "Cancel" %} -
+ {% comment %}
+ + {% trans "Cancel" %} +
{% endcomment %} +
+ + + + {% trans "Cancel" %} +
+ + + {% endblock content %} diff --git a/templates/sales/estimates/estimate_list.html b/templates/sales/estimates/estimate_list.html index d9d9e172..43a7670a 100644 --- a/templates/sales/estimates/estimate_list.html +++ b/templates/sales/estimates/estimate_list.html @@ -46,7 +46,7 @@ - + {% trans "view"|capfirst %} diff --git a/templates/sales/invoices/invoice_list.html b/templates/sales/invoices/invoice_list.html index eb88c962..62ed321e 100644 --- a/templates/sales/invoices/invoice_list.html +++ b/templates/sales/invoices/invoice_list.html @@ -54,13 +54,14 @@ {% endif %} {{ invoice.created }} - - + - + {% trans "View" %} + {% empty %} diff --git a/templates/sales/payments/payment_list.html b/templates/sales/payments/payment_list.html index e4c1c592..2c2c268b 100644 --- a/templates/sales/payments/payment_list.html +++ b/templates/sales/payments/payment_list.html @@ -41,8 +41,8 @@ {% endif %} {{ journal.timestamp }} {{ journal.description }} - - {% trans "View Tranactions" %} + + {% trans "View Tranactions"|capfirst %} {% empty %} diff --git a/templates/vendors/vendor_form.html b/templates/vendors/vendor_form.html index 243681b0..1d5ccf90 100644 --- a/templates/vendors/vendor_form.html +++ b/templates/vendors/vendor_form.html @@ -34,13 +34,14 @@ {% for error in form.errors %}
{{ error }}
{% endfor %} -
- {% trans "Cancel"|capfirst %} - + {{ _("Save") }} + + {% trans "Cancel" %}
+ diff --git a/templates/vendors/vendors_list.html b/templates/vendors/vendors_list.html index cb33fc05..fd2b1345 100644 --- a/templates/vendors/vendors_list.html +++ b/templates/vendors/vendors_list.html @@ -15,7 +15,7 @@
- {{ _("Add Vendor") }} + {{ _("Add Vendor") }}