fix print and preview quote and add broker to req and complete company model.
This commit is contained in:
		
							parent
							
								
									5ce94214d5
								
							
						
					
					
						commit
						246a2c0759
					
				
					 19 changed files with 872 additions and 260 deletions
				
			
		| 
						 | 
				
			
			@ -29,7 +29,7 @@ class AffairsAdmin(admin.ModelAdmin):
 | 
			
		|||
@admin.register(Broker)
 | 
			
		||||
class BrokerAdmin(admin.ModelAdmin):
 | 
			
		||||
    list_display = ['name', 'affairs', 'slug']
 | 
			
		||||
    list_filter = ['affairs__county__city', 'affairs__county', 'affairs']
 | 
			
		||||
    list_filter = ['affairs__county__city', 'affairs__county', 'affairs' ]
 | 
			
		||||
    search_fields = ['name', 'affairs__name', 'affairs__county__name']
 | 
			
		||||
    readonly_fields = ['deleted_at']
 | 
			
		||||
    prepopulated_fields = {'slug': ('name',)}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										20
									
								
								locations/migrations/0002_broker_company.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								locations/migrations/0002_broker_company.py
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,20 @@
 | 
			
		|||
# Generated by Django 5.2.4 on 2025-09-07 10:48
 | 
			
		||||
 | 
			
		||||
import django.db.models.deletion
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('accounts', '0001_initial'),
 | 
			
		||||
        ('locations', '0001_initial'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='broker',
 | 
			
		||||
            name='company',
 | 
			
		||||
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='accounts.company', verbose_name='شرکت'),
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
							
								
								
									
										17
									
								
								locations/migrations/0003_remove_broker_company.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								locations/migrations/0003_remove_broker_company.py
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,17 @@
 | 
			
		|||
# Generated by Django 5.2.4 on 2025-09-07 13:43
 | 
			
		||||
 | 
			
		||||
from django.db import migrations
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('locations', '0002_broker_company'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.RemoveField(
 | 
			
		||||
            model_name='broker',
 | 
			
		||||
            name='company',
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue