feat: Add Telegram chat ID to ShopModel for automatic invoice sending
chore: Update Dockerfile to install WeasyPrint dependencies feat: Enhance ShopOrderModelAdmin with invoice download buttons feat: Implement invoice generation for OrderModel and ShopOrderModel feat: Send invoice to shop's Telegram chat upon ShopOrderModel creation feat: Create Celery task to send shop order invoice via Telegram feat: Add invoice download endpoints for OrderModel and ShopOrderModel feat: Implement views for downloading order and shop order invoices chore: Update requirements.txt to include necessary packages for PDF generation feat: Create HTML templates for order and shop order invoices
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.1.2 on 2025-12-28 08:03
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('account', '0033_shopmodel_commission_percent'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='shopmodel',
|
||||
name='telegram_chat_id',
|
||||
field=models.CharField(blank=True, help_text='برای ارسال خودکار فاکتورها به تلگرام', max_length=100, null=True, verbose_name='شناسه چت تلگرام'),
|
||||
),
|
||||
]
|
||||
@@ -143,6 +143,7 @@ class ShopModel(models.Model):
|
||||
shop_name = models.CharField(max_length=100, verbose_name='نام فروشگاه')
|
||||
shop_description = models.TextField(verbose_name='توضیحات فروشگاه')
|
||||
commission_percent = models.DecimalField(max_digits=5, decimal_places=2, verbose_name='درصد کمیسیون')
|
||||
telegram_chat_id = models.CharField(max_length=100, blank=True, null=True, verbose_name='شناسه چت تلگرام', help_text='برای ارسال خودکار فاکتورها به تلگرام')
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.user.phone} - {self.shop_name}"
|
||||
|
||||
Reference in New Issue
Block a user