diff options
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 |
commit | 10a5d53caf0776479b145673c693bdcf89b7e56b (patch) | |
tree | c61078f324b70615834a94c79ae72e3d8a696b57 /archaeological_operations | |
parent | 789e8e46dd1a3731c8014901470b8151bc1331db (diff) | |
download | Ishtar-10a5d53caf0776479b145673c693bdcf89b7e56b.tar.bz2 Ishtar-10a5d53caf0776479b145673c693bdcf89b7e56b.zip |
Operations: filter organizations for operator field (refs #1678)
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/forms.py | 5 |
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"), |