From 8b8cd541389412c4960f068848db7e45b71459b9 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 11 Sep 2024 12:24:21 +0200 Subject: ✨ criteria searches: add missing criteria for operation, find and context records (refs #6020) - Context records bulk update: add fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Criteria searches: - Finds: context record type - Operations: has an attached archeo file - Context records : - Type of documentation - Description - Filling - General comment Context records bulk update: - documentation - identification - excavation technic --- archaeological_operations/forms.py | 1 + archaeological_operations/models.py | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'archaeological_operations') diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 2340d36be..cf9df8594 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -553,6 +553,7 @@ class OperationSelect(GeoItemSelect): reverse_lazy('autocomplete-archaeologicalsite'), associated_model=models.ArchaeologicalSite), validators=[valid_id(models.ArchaeologicalSite)]) + associated_file__isnull = forms.NullBooleanField(label=_("Has an associated file?")) history_creator = forms.IntegerField( label=_("Created by"), widget=widgets.JQueryAutoComplete( diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 50dcd20f3..e847429a0 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -1020,6 +1020,7 @@ class Operation( "documents__image__isnull", "documents__associated_file__isnull", "documents__associated_url__isnull", + "associated_file__isnull", ] DATED_FIELDS = BaseHistorizedItem.DATED_FIELDS + [ "start_date", @@ -1215,6 +1216,10 @@ class Operation( "operator_reference": SearchAltName( pgettext_lazy("key for text search", "operator-reference"), "operator_reference__iexact" ), + "associated_file__isnull": SearchAltName( + pgettext_lazy("key for text search", "has-archeo-file"), + "associated_file__isnull" + ), "abstract": SearchAltName( pgettext_lazy("key for text search", "abstract"), "abstract__iexact" ), -- cgit v1.2.3