From 22b0813edb80f378bf4906ab3157c26b0ea73457 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 18 Feb 2019 11:24:25 +0100 Subject: Sheet person: add related items tables --- archaeological_finds/models_treatments.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'archaeological_finds') diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index 9fc130af5..e2882df35 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -77,6 +77,7 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem, "downstream_cached_label": "downstream__cached_label", "upstream_cached_label": "upstream__cached_label", 'person__cached_label': 'person__cached_label', + "person__pk": "person__pk", # used by dynamic_table_documents } COL_LABELS = { "downstream_cached_label": _(u"Downstream find"), @@ -867,7 +868,10 @@ class TreatmentFile(DashboardFormItem, ClosedItem, BaseHistorizedItem, INT_SEARCH_VECTORS = ['year', 'index'] PARENT_SEARCH_VECTORS = ['in_charge', 'applicant', 'applicant_organisation'] - EXTRA_REQUEST_KEYS = {} + EXTRA_REQUEST_KEYS = { + "in_charge__pk": "in_charge__pk", # used by dynamic_table_documents + "applicant__pk": "applicant__pk", # used by dynamic_table_documents + } # alternative names of fields for searches ALT_NAMES = { 'name': SearchAltName( -- cgit v1.2.3