summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_context_records/forms.py1
-rw-r--r--archaeological_context_records/models.py3
2 files changed, 4 insertions, 0 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py
index 73666cab5..f4c20d55a 100644
--- a/archaeological_context_records/forms.py
+++ b/archaeological_context_records/forms.py
@@ -148,6 +148,7 @@ class RecordSelect(DocumentItemSelect, PeriodSelect):
operation__code_patriarche = forms.CharField(
max_length=500, widget=OAWidget, label=_("Code PATRIARCHE")
)
+ operation__common_name = forms.CharField(label=_("Operation name"), max_length=30)
operation__year = forms.IntegerField(label=_("Operation's year"))
operation__operation_code = forms.IntegerField(
label=_("Operation's number (index by year)")
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 41a76b171..257e378ce 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -504,6 +504,9 @@ class ContextRecord(
"operation__year": SearchAltName(
pgettext_lazy("key for text search", "operation-year"), "operation__year"
),
+ "operation__common_name": SearchAltName(
+ pgettext_lazy("key fro text search", "operation-name"), "operation__common_name__icontains"
+ ),
"operation__code_patriarche": SearchAltName(
pgettext_lazy("key for text search", "patriarche"),
"operation__code_patriarche__iexact",