summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2014-04-01 20:43:20 +0200
committerÉtienne Loks <etienne.loks@proxience.com>2014-04-01 20:43:20 +0200
commit2902a21088ea21ae1291f10eea4e5a2ff9ea0207 (patch)
treec61078f324b70615834a94c79ae72e3d8a696b57 /archaeological_operations/forms.py
parente25f2b0f735c3a72629f988d9ebfdaa9307c9a4c (diff)
downloadIshtar-2902a21088ea21ae1291f10eea4e5a2ff9ea0207.tar.bz2
Ishtar-2902a21088ea21ae1291f10eea4e5a2ff9ea0207.zip
Operations: filter organizations for operator field (refs #1678)
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index cb4b52fe3..f8aafb362 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -34,7 +34,7 @@ from django.utils.translation import ugettext_lazy as _, pgettext_lazy
from django.utils.safestring import mark_safe
from ishtar_common.models import valid_id, PersonType, Person, Town, \
- DocumentTemplate, Organization
+ DocumentTemplate, Organization, OrganizationType
from archaeological_files.models import File
import models
@@ -296,7 +296,8 @@ class OperationFormGeneral(forms.Form):
validators=[valid_id(Person)], required=False)
operator = forms.IntegerField(label=_("Operator"),
widget=widgets.JQueryAutoComplete(reverse_lazy(
- 'autocomplete-organization',),
+ 'autocomplete-organization',
+ args=[OrganizationType.objects.get(txt_idx='operator').pk]),
associated_model=Organization, new=True),
validators=[valid_id(Organization)], required=False)
in_charge = forms.IntegerField(label=_("In charge"),