Adds initial inventory management, Django 1.6, ++
Adds dep on south
This commit is contained in:
1 parent
09d41ba682
commit
32e41c05ae
32 files changed
+5561
-1382
No files matched your search
@@ -53,3 +53,20 @@ class SimpleCreateUserForm(forms.Form):
|
||||
profile.save()
|
||||
|
||||
return user
|
||||
|
||||
class InventoryTransactionForm(forms.ModelForm):
|
||||
unit_price = forms.FloatField(required=True, localize=True)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
# Only show active products
|
||||
super (InventoryTransactionForm, self).__init__(*args,**kwargs)
|
||||
self.fields['product'].queryset = Product.objects.filter(active=True)
|
||||
|
||||
class Meta:
|
||||
model = InventoryTransaction
|
||||
fields = ['product', 'amount', 'unit_price', 'comment']
|
||||
|
||||
class DateRangeForm(forms.Form):
|
||||
start_time = forms.DateTimeField(required=False, label=_("Fra"))
|
||||
end_time = forms.DateTimeField(required=False, label=_("Til"))
|
||||
|
||||
Reference in new issue
Block a user