Fix avaiable actions on genericteam acount

Empêche de rentrer des opérations et des transferts sur GNR (compte
équipe K-Fêt partagé)

Fix 84
This commit is contained in:
Aurélien Delobelle 2016-09-29 21:47:37 +02:00
parent f39e1a653e
commit 8349388ab3

View file

@ -280,12 +280,12 @@ class KPsulOperationGroupForm(forms.ModelForm):
is_protected=False, valid_from__lte=timezone.now(),
valid_to__gte=timezone.now()),
widget = forms.HiddenInput())
on_acc = forms.ModelChoiceField(
queryset = Account.objects.exclude(trigramme='GNR'),
widget = forms.HiddenInput())
class Meta:
model = OperationGroup
fields = ['on_acc', 'checkout', 'comment']
widgets = {
'on_acc' : forms.HiddenInput(),
}
class KPsulAccountForm(forms.ModelForm):
class Meta:
@ -418,11 +418,11 @@ class TransferGroupForm(forms.ModelForm):
class TransferForm(forms.ModelForm):
from_acc = forms.ModelChoiceField(
queryset = Account.objects.exclude(trigramme__in=['LIQ', '#13']),
queryset = Account.objects.exclude(trigramme__in=['LIQ', '#13', 'GNR']),
widget = forms.HiddenInput()
)
to_acc = forms.ModelChoiceField(
queryset = Account.objects.exclude(trigramme__in=['LIQ', '#13']),
queryset = Account.objects.exclude(trigramme__in=['LIQ', '#13', 'GNR']),
widget = forms.HiddenInput()
)