fix/de los tickets T2026-05-027, T2025-09-004 y T2025-09-056
This commit is contained in:
@@ -5,14 +5,18 @@ from .models import Organizacion
|
||||
|
||||
@admin.register(Organizacion)
|
||||
class OrganizacionAdmin(admin.ModelAdmin):
|
||||
list_display = ('nombre', 'rfc', 'email', 'telefono', 'owner', 'is_active', 'is_verified', 'inicio', 'vencimiento')
|
||||
search_fields = ('nombre', 'rfc', 'email')
|
||||
list_display = ('nombre', 'rfc', 'hub_tenant_slug', 'email', 'owner', 'is_active', 'is_verified', 'inicio', 'vencimiento')
|
||||
search_fields = ('nombre', 'rfc', 'email', 'hub_tenant_slug')
|
||||
list_filter = ('is_active', 'is_verified', 'is_agente_aduanal')
|
||||
ordering = ('nombre',)
|
||||
autocomplete_fields = ('owner',)
|
||||
readonly_fields = ('created_at', 'updated_at')
|
||||
fieldsets = (
|
||||
(None, {'fields': ('nombre', 'rfc', 'titular', 'licencia')}),
|
||||
('Integración Hub', {
|
||||
'fields': ('hub_tenant_slug',),
|
||||
'description': 'Slug único del tenant en Aduanasoft Hub. Debe coincidir exactamente con el slug creado en el panel del Hub.',
|
||||
}),
|
||||
('Contacto', {'fields': ('email', 'telefono', 'estado', 'ciudad')}),
|
||||
('Administrador maestro', {'fields': ('owner',)}),
|
||||
('Estado', {'fields': ('is_active', 'is_verified', 'is_agente_aduanal', 'apply_auto_download')}),
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('organization', '0004_organizacion_owner'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='organizacion',
|
||||
name='hub_tenant_slug',
|
||||
field=models.CharField(blank=True, default='', max_length=100),
|
||||
),
|
||||
]
|
||||
@@ -61,7 +61,10 @@ class Organizacion(models.Model):
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
|
||||
observaciones = models.TextField(null=True, blank=True)
|
||||
|
||||
|
||||
# Slug del tenant en Hub — "temex", "empresa-abc", etc.
|
||||
hub_tenant_slug = models.CharField(max_length=100, blank=True, default='')
|
||||
|
||||
|
||||
@property
|
||||
def espacio_utilizado(self):
|
||||
|
||||
Reference in New Issue
Block a user