From 58c2776a1c15e4b17bdcfc9c9eb9017866713f21 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 11 Jul 2022 01:37:12 +0200 Subject: Preventive file: add some fields - better sheet - Administrativ act: add comment --- archaeological_operations/models.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'archaeological_operations/models.py') diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index a716bff8d..731d6cb34 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -2447,6 +2447,9 @@ class AdministrativeAct(DocumentItem, BaseHistorizedItem, OwnPerms, ValueGetter) pgettext_lazy("key for text search", "treatment-file-type"), "treatment_file__type__label__iexact", ), + "comment": SearchAltName( + pgettext_lazy("key for text search", "comment"), "comment__iexact" + ), } ALT_NAMES.update(BaseHistorizedItem.ALT_NAMES) ALT_NAMES.update(DocumentItem.ALT_NAMES) @@ -2540,6 +2543,7 @@ class AdministrativeAct(DocumentItem, BaseHistorizedItem, OwnPerms, ValueGetter) default="", help_text=_("Cached values get from associated towns"), ) + comment = models.TextField(_("Comment"), blank=True, default="") documents = models.ManyToManyField( Document, related_name="administrativeacts", -- cgit v1.2.3