aboutsummaryrefslogtreecommitdiffstats
path: root/servo/forms
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-09-21 11:07:03 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-09-21 11:07:03 +0300
commit4e7df49fc881793cb34629b8338387db330b1310 (patch)
tree12198a866b9c89fd17d09b46f0e212a3e030e213 /servo/forms
parent4a72e3e316861e0d67644ec4102bfb003b28ccb1 (diff)
downloadServo-4e7df49fc881793cb34629b8338387db330b1310.tar.gz
Servo-4e7df49fc881793cb34629b8338387db330b1310.tar.bz2
Servo-4e7df49fc881793cb34629b8338387db330b1310.zip
Added location filter to inventory search
Diffstat (limited to 'servo/forms')
-rw-r--r--servo/forms/product.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/servo/forms/product.py b/servo/forms/product.py
index 227a9b3..08fb71a 100644
--- a/servo/forms/product.py
+++ b/servo/forms/product.py
@@ -53,6 +53,11 @@ class ProductSearchForm(forms.Form):
label=_('Device model is'),
queryset=TaggedItem.objects.none()
)
+ location = forms.ModelChoiceField(
+ required=False,
+ label=_('Location is'),
+ queryset=Location.objects.filter(enabled=True)
+ )
def __init__(self, *args, **kwargs):
super(ProductSearchForm, self).__init__(*args, **kwargs)