summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2014-07-18 18:38:14 +0200
committerÉtienne Loks <etienne.loks@proxience.com>2014-07-18 18:38:14 +0200
commitdcf828da68293f50b654a72a59f5d31dafa1a013 (patch)
treecce50e2770551b41dec84b5eb030c83d31b8f1f0
parent7bd6ca9543ea9e3347f3bea5a360f91d203e4ffb (diff)
downloadIshtar-dcf828da68293f50b654a72a59f5d31dafa1a013.tar.bz2
Ishtar-dcf828da68293f50b654a72a59f5d31dafa1a013.zip
Fix doc generation search (refs #1591)
-rw-r--r--archaeological_files/forms.py7
-rw-r--r--archaeological_files/ishtar_menu.py2
-rw-r--r--archaeological_files/views.py20
-rw-r--r--archaeological_operations/ishtar_menu.py2
4 files changed, 18 insertions, 13 deletions
diff --git a/archaeological_files/forms.py b/archaeological_files/forms.py
index 50d67027c..4ff483a75 100644
--- a/archaeological_files/forms.py
+++ b/archaeological_files/forms.py
@@ -48,6 +48,9 @@ from ishtar_common import widgets
GENERAL_CONTRACTOR, created = PersonType.objects.get_or_create(
txt_idx='general_contractor')
+GENERAL_CONTRACTOR_ORGA, created = OrganizationType.objects.get_or_create(
+ txt_idx='general_contractor')
+
class FileSelect(TableSelect):
year = forms.IntegerField(label=_("Year"))
numeric_reference = forms.IntegerField(label=_("Numeric reference"))
@@ -70,7 +73,7 @@ class FileSelect(TableSelect):
label=_(u"Organization of general contractor"),
widget=widgets.JQueryAutoComplete(
reverse_lazy('autocomplete-organization',
- args=[GENERAL_CONTRACTOR.pk]),
+ args=[GENERAL_CONTRACTOR_ORGA.pk]),
associated_model=Organization),
validators=[valid_id(Organization)])
in_charge = forms.IntegerField(
@@ -316,7 +319,7 @@ class AdministrativeActFileSelect(TableSelect):
label=_(u"Organization of general contractor"),
widget=widgets.JQueryAutoComplete(
reverse_lazy('autocomplete-organization',
- args=[GENERAL_CONTRACTOR.pk]),
+ args=[GENERAL_CONTRACTOR_ORGA.pk]),
associated_model=Organization),
validators=[valid_id(Organization)])
associated_file__numeric_reference = forms.IntegerField(
diff --git a/archaeological_files/ishtar_menu.py b/archaeological_files/ishtar_menu.py
index be6c0ff5f..fc0401115 100644
--- a/archaeological_files/ishtar_menu.py
+++ b/archaeological_files/ishtar_menu.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2013 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
+# Copyright (C) 2010-2014 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
diff --git a/archaeological_files/views.py b/archaeological_files/views.py
index a7c193843..8498352cf 100644
--- a/archaeological_files/views.py
+++ b/archaeological_files/views.py
@@ -67,16 +67,16 @@ def autocomplete_file(request):
get_file = get_item(models.File, 'get_file', 'file',
bool_fields = ['end_date__isnull'],
- associated_models = [(Person, 'associated_file__general_contractor')],
extra_request_keys={
- 'parcel_0':('parcels__section',
- 'operations__parcels__section'),
- 'parcel_1':('parcels__parcel_number',
- 'operations__parcels__parcel_number'),
- 'end_date':'end_date__isnull',
- 'name':'name__icontains',
- 'permit_reference':'permit_reference__icontains',
- 'history_creator':'history_creator__ishtaruser__person__pk',
+ 'parcel_0':('parcels__section',
+ 'operations__parcels__section'),
+ 'parcel_1':('parcels__parcel_number',
+ 'operations__parcels__parcel_number'),
+ 'end_date':'end_date__isnull',
+ 'name':'name__icontains',
+ 'permit_reference':'permit_reference__icontains',
+ 'general_contractor__attached_to':'general_contractor__attached_to__pk',
+ 'history_creator':'history_creator__ishtaruser__person__pk',
},)
show_file = show_item(models.File, 'file')
revert_file = revert_item(models.File)
@@ -94,6 +94,8 @@ get_administrativeactfile = get_item(AdministrativeAct,
'act_type__intented_to':'act_type__intented_to',
'signature_date_before':'signature_date__lte',
'signature_date_after':'signature_date__gte',
+ 'associated_file__general_contractor__attached_to':\
+ 'associated_file__general_contractor__attached_to__pk',
'associated_file__name':'associated_file__name__icontains',
'associated_file__permit_reference':\
'associated_file__permit_reference__icontains'},
diff --git a/archaeological_operations/ishtar_menu.py b/archaeological_operations/ishtar_menu.py
index 830a0ed09..7549bf72b 100644
--- a/archaeological_operations/ishtar_menu.py
+++ b/archaeological_operations/ishtar_menu.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2013 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
+# Copyright (C) 2012-2014 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as