summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_finds/forms_treatments.py2
-rw-r--r--archaeological_finds/models_treatments.py8
2 files changed, 10 insertions, 0 deletions
diff --git a/archaeological_finds/forms_treatments.py b/archaeological_finds/forms_treatments.py
index a15571a06..8122f75ad 100644
--- a/archaeological_finds/forms_treatments.py
+++ b/archaeological_finds/forms_treatments.py
@@ -70,6 +70,8 @@ class TreatmentSelect(DocumentItemSelect):
label=_("Reference"), max_length=200, required=False)
treatment_status = forms.ChoiceField(label=_("Status"), choices=[])
input_status = forms.ChoiceField(label=_("Input status"), choices=[])
+ start_date = DateField(label=_("Start date"))
+ end_date = DateField(label=_("End date"))
location = forms.IntegerField(
label=_("Location"),
widget=widgets.JQueryAutoComplete(
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py
index 5e6e1ed98..faf448b63 100644
--- a/archaeological_finds/models_treatments.py
+++ b/archaeological_finds/models_treatments.py
@@ -293,6 +293,14 @@ class Treatment(
pgettext_lazy("key for text search", "organization"),
"organization__name__iexact",
),
+ "start_date": SearchAltName(
+ pgettext_lazy("key for text search", "start"),
+ "start_date",
+ ),
+ "end_date": SearchAltName(
+ pgettext_lazy("key for text search", "end"),
+ "end_date",
+ ),
}
ALT_NAMES.update(BaseHistorizedItem.ALT_NAMES)
ALT_NAMES.update(DocumentItem.ALT_NAMES)