From 8e3bbe980da00009663a9ed2c43272065cf60a1a Mon Sep 17 00:00:00 2001 From: Cefin Date: Wed, 27 Oct 2021 17:31:29 +0200 Subject: search document by operation type #4698 --- ishtar_common/forms_common.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ishtar_common/forms_common.py') diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index b689b7baf..821659828 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -71,7 +71,7 @@ from .forms import ( from ishtar_common.data_importer import ImporterError from ishtar_common.utils import is_downloadable, clean_session_cache, max_size_help -from archaeological_operations.models import Operation +from archaeological_operations.models import Operation, OperationType from archaeological_context_records.models import ContextRecord from archaeological_finds.models import Find, FindBasket from archaeological_warehouse.models import Container @@ -1946,6 +1946,10 @@ class DocumentSelect(HistorySelect): ), validators=[models.valid_id(Operation)], ) + operations__operation_type = forms.ChoiceField( + label=_("Operation type"), + choices=[] + ) context_record = forms.IntegerField( label=_("Context record"), required=False, @@ -2005,6 +2009,7 @@ class DocumentSelect(HistorySelect): FieldType("tag", models.DocumentTag), FieldType("language", models.Language), FieldType("licenses", models.LicenseType), + FieldType("operations__operation_type", models.OperationType), ] PROFILE_FILTER = { -- cgit v1.2.3