diff options
Diffstat (limited to 'archaeological_operations')
| -rw-r--r-- | archaeological_operations/admin.py | 2 | ||||
| -rw-r--r-- | archaeological_operations/forms.py | 3 | ||||
| -rw-r--r-- | archaeological_operations/models.py | 2 | ||||
| -rw-r--r-- | archaeological_operations/urls.py | 3 | ||||
| -rw-r--r-- | archaeological_operations/wizards.py | 1 |
5 files changed, 8 insertions, 3 deletions
diff --git a/archaeological_operations/admin.py b/archaeological_operations/admin.py index 9f886bc62..d976aac77 100644 --- a/archaeological_operations/admin.py +++ b/archaeological_operations/admin.py @@ -31,7 +31,7 @@ class AdministrativeActAdmin(HistorizedObjectAdmin): list_filter = ('act_type',) search_fields = ('year', 'index') readonly_fields = ('in_charge', 'operator', 'scientist', 'signatory', - 'operation', 'associated_file', 'imports', + 'associated_file', 'imports', 'departments_label', 'towns_label', 'history_modifier', 'history_creator') model = models.AdministrativeAct diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 49824e24a..b61285177 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -1136,7 +1136,8 @@ class OperationSourceSelect(SourceSelect): OperationSourceFormSelection = get_form_selection( 'OperationSourceFormSelection', _(u"Documentation search"), 'pk', models.OperationSource, OperationSourceSelect, 'get-operationsource', - _(u"You should select a document.")) + _(u"You should select a document."), + get_full_url='get-operationsource-full') ################################################ # Administrative act management for operations # diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 253ea7635..e3453f0cf 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -251,7 +251,7 @@ class Operation(BaseHistorizedItem, OwnPerms, ValueGetter, ShortMenuItem, owns = super(Operation, cls).get_owns(user) # owns = owns.annotate(null_count=Count('operation_code')) # return owns.order_by("common_name", "-year", "operation_code") - return sorted(owns.all(), key=lambda x: x.cached_label) + return sorted(owns, key=lambda x: x.cached_label) def __unicode__(self): if self.cached_label: diff --git a/archaeological_operations/urls.py b/archaeological_operations/urls.py index 76723deab..ef7d14dd6 100644 --- a/archaeological_operations/urls.py +++ b/archaeological_operations/urls.py @@ -130,6 +130,9 @@ urlpatterns += patterns( 'show_operationsource', name=models.OperationSource.SHOW_URL), url(r'get-operationsource/(?P<type>.+)?$', 'get_operationsource', name='get-operationsource'), + url(r'get-operationsource-full/(?P<type>.+)?$', + 'get_operationsource', name='get-operationsource-full', + kwargs={'full': True}), url(r'dashboard_operation/$', 'dashboard_operation', name='dashboard-operation'), url(r'autocomplete-archaeologicalsite/$', diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index c90b6fa8a..c51b88d0b 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -361,6 +361,7 @@ class OperationAdministrativeActWizard(OperationWizard): step = self.steps.current if step.startswith('final-'): general_form_key = 'administrativeact-' + self.url_name + act_type = None try: act_type = models.ActType.objects.get( pk=self.session_get_value(general_form_key, "act_type")) |
