forked from DGNum/gestioCOF
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:
parent
f39e1a653e
commit
8349388ab3
1 changed files with 5 additions and 5 deletions
|
@ -280,12 +280,12 @@ class KPsulOperationGroupForm(forms.ModelForm):
|
||||||
is_protected=False, valid_from__lte=timezone.now(),
|
is_protected=False, valid_from__lte=timezone.now(),
|
||||||
valid_to__gte=timezone.now()),
|
valid_to__gte=timezone.now()),
|
||||||
widget = forms.HiddenInput())
|
widget = forms.HiddenInput())
|
||||||
|
on_acc = forms.ModelChoiceField(
|
||||||
|
queryset = Account.objects.exclude(trigramme='GNR'),
|
||||||
|
widget = forms.HiddenInput())
|
||||||
class Meta:
|
class Meta:
|
||||||
model = OperationGroup
|
model = OperationGroup
|
||||||
fields = ['on_acc', 'checkout', 'comment']
|
fields = ['on_acc', 'checkout', 'comment']
|
||||||
widgets = {
|
|
||||||
'on_acc' : forms.HiddenInput(),
|
|
||||||
}
|
|
||||||
|
|
||||||
class KPsulAccountForm(forms.ModelForm):
|
class KPsulAccountForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -418,11 +418,11 @@ class TransferGroupForm(forms.ModelForm):
|
||||||
|
|
||||||
class TransferForm(forms.ModelForm):
|
class TransferForm(forms.ModelForm):
|
||||||
from_acc = forms.ModelChoiceField(
|
from_acc = forms.ModelChoiceField(
|
||||||
queryset = Account.objects.exclude(trigramme__in=['LIQ', '#13']),
|
queryset = Account.objects.exclude(trigramme__in=['LIQ', '#13', 'GNR']),
|
||||||
widget = forms.HiddenInput()
|
widget = forms.HiddenInput()
|
||||||
)
|
)
|
||||||
to_acc = forms.ModelChoiceField(
|
to_acc = forms.ModelChoiceField(
|
||||||
queryset = Account.objects.exclude(trigramme__in=['LIQ', '#13']),
|
queryset = Account.objects.exclude(trigramme__in=['LIQ', '#13', 'GNR']),
|
||||||
widget = forms.HiddenInput()
|
widget = forms.HiddenInput()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue