diff options
author | Cefin <kevon@tuta.io> | 2021-10-28 10:18:04 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-07-08 09:58:49 +0200 |
commit | 17d825d7bfdf3c81f4bea6aeadac9a31762dfdeb (patch) | |
tree | f3fd8c9c73d1a512738a358d74f8c8710733e9c2 | |
parent | 33efb94deb35fac36f9beb0b7320f9d9f92f7d09 (diff) | |
download | Ishtar-17d825d7bfdf3c81f4bea6aeadac9a31762dfdeb.tar.bz2 Ishtar-17d825d7bfdf3c81f4bea6aeadac9a31762dfdeb.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 821659828..29fb75031 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -1950,6 +1950,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 95fc2cef6..6bfffd0cf 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3698,6 +3698,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", |