summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-03-01 16:42:40 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-03-01 16:42:51 +0100
commit854bac3ecaae179fa3c8c6e66893fc3e0c554e26 (patch)
tree999157ca04ed2f80a50e2b7aee615820d7e1c06d /archaeological_operations
parentdd146785e0eb7921746dc4373a776c4a6c82ac26 (diff)
downloadIshtar-854bac3ecaae179fa3c8c6e66893fc3e0c554e26.tar.bz2
Ishtar-854bac3ecaae179fa3c8c6e66893fc3e0c554e26.zip
Search - Operation: add "old code" search (refs #5456)
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/forms.py3
-rw-r--r--archaeological_operations/models.py4
2 files changed, 7 insertions, 0 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index cf63b51c4..bcc568b86 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -493,6 +493,9 @@ class OperationSelect(GeoItemSelect):
max_length=500,
widget=OAWidget,
label="Code PATRIARCHE")
+ old_code = forms.CharField(
+ max_length=200,
+ label=_("Old code"))
drassm_code = forms.CharField(
label=_("DRASSM code"), required=False, max_length=100)
towns = get_town_field()
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index d5110df9c..fda6101d2 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -1090,6 +1090,10 @@ class Operation(
"operation_code": SearchAltName(
pgettext_lazy("key for text search", "operation-code"), "operation_code"
),
+ "old_code": SearchAltName(
+ pgettext_lazy("key for text search", "operation-old-code"),
+ "old_code__iexact"
+ ),
"code_patriarche": SearchAltName(
pgettext_lazy("key for text search", "patriarche"),
"code_patriarche__iexact",