summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/forms_common.py1
-rw-r--r--ishtar_common/models.py4
2 files changed, 5 insertions, 0 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py
index 9c9611778..87d2a3bb3 100644
--- a/ishtar_common/forms_common.py
+++ b/ishtar_common/forms_common.py
@@ -1934,6 +1934,7 @@ class DocumentSelect(HistorySelect):
label=_("Operation type"),
choices=[]
)
+ operations__year = forms.IntegerField(label=_("Operation year"))
context_record = forms.IntegerField(
label=_("Context record"),
required=False,
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 43dc5ed51..f5f1d8859 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -3689,6 +3689,10 @@ class Document(
pgettext_lazy("key for text search", "operation-type"),
"operations__operation_type__label__iexact",
),
+ "operations__year": SearchAltName(
+ pgettext_lazy("key for text search", "operation-year"),
+ "operations__year",
+ ),
"context_record": SearchAltName(
pgettext_lazy("key for text search", "context-record"),
"context_records__cached_label__iexact",