forked from DGNum/gestioCOF
filter sold attributions
This commit is contained in:
parent
e408437ab1
commit
8d1f599577
1 changed files with 4 additions and 5 deletions
|
@ -229,11 +229,10 @@ class SpectacleReventeAdmin(admin.ModelAdmin):
|
|||
actions_on_bottom = True
|
||||
|
||||
def transfer(self, request, queryset):
|
||||
for revente in queryset.all():
|
||||
if revente.soldTo:
|
||||
attrib = revente.attribution
|
||||
attrib.participant = revente.soldTo
|
||||
attrib.save()
|
||||
for revente in queryset.exclude(soldTo__isnull=True).all():
|
||||
attrib = revente.attribution
|
||||
attrib.participant = revente.soldTo
|
||||
attrib.save()
|
||||
transfer.short_description = "Transférer les reventes sélectionnées"
|
||||
|
||||
def reinit(self, request, queryset):
|
||||
|
|
Loading…
Reference in a new issue