From fa90d96f807d56d87ccfbb3141e70a7603ca5b60 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 2 Jun 2020 13:18:25 +0200 Subject: Documents form: new fields --- ishtar_common/models.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index b3a19c42f..58385c1dc 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -4477,6 +4477,18 @@ def get_responsible_planning_service_label(): return _("Error: responsible_planning_service type is missing") +def get_publisher_label(): + if apps.ready: + lbls = [] + for key in settings.ISHTAR_SLUGS["document-editor"]: + lbl = get_general_type_label(OrganizationType, key) + if lbl: + lbls.append(lbl) + if lbls: + return " ; ".join(lbls) + return _("Error: publisher type is missing") + + class TitleType(GeneralType): class Meta: verbose_name = _("Title type") -- cgit v1.2.3