Browse Source

Fixed transaction checking.

Now the default value for the form is set to the value
given in TransactionType.needsCheck
master
Sebastian Lohff 11 years ago
parent
commit
fd46332e65
  1. 4
      k4ever/transaction/forms.py

4
k4ever/transaction/forms.py

@ -11,3 +11,7 @@ class TransactionForm(forms.ModelForm): @@ -11,3 +11,7 @@ class TransactionForm(forms.ModelForm):
def clean_amount(self):
data = self.cleaned_data['amount']
return data
def clean(self):
cleaned_data = super(TransactionForm, self).clean()
self.instance.checked = not cleaned_data['transactionType'].needsCheck
return cleaned_data

Loading…
Cancel
Save