diff options
author | Cefin <kevon@tuta.io> | 2021-10-28 10:18:04 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-11-16 17:04:41 +0100 |
commit | d2539c0d1814e6d8bdf116b64e77680bbbf32268 (patch) | |
tree | 17a2f90e0f217020787b6690f8144438084954e9 | |
parent | 3d4a0d8741ba9b3f7eb42f3d49726e673e08136f (diff) | |
download | Ishtar-d2539c0d1814e6d8bdf116b64e77680bbbf32268.tar.bz2 Ishtar-d2539c0d1814e6d8bdf116b64e77680bbbf32268.zip |
adding on document search by operation year #5194
-rw-r--r-- | ishtar_common/forms_common.py | 1 | ||||
-rw-r--r-- | ishtar_common/models.py | 4 |
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", |