From 0720f2d7b1a687cd51228562259fedd06a75ca36 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 17 Apr 2018 13:19:15 +0200 Subject: Show item at the end of person, account, organization wizard. Profile column for account tables. Profiles on person sheet. --- ishtar_common/models.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index d76d2e219..8d6278151 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -2405,6 +2405,8 @@ class Person(Address, Merge, OwnPerms, ValueGetter): ) TABLE_COLS = ('name', 'surname', 'raw_name', 'email', 'person_types_list', 'attached_to__name', 'town') + TABLE_COLS_ACCOUNT = ('name', 'surname', 'raw_name', 'email', + 'profiles_list', 'attached_to__name', 'town') SHOW_URL = 'show-person' MODIFY_URL = 'person_modify' BASE_SEARCH_VECTORS = ['name', 'surname', 'raw_name', 'town', @@ -2418,7 +2420,7 @@ class Person(Address, Merge, OwnPerms, ValueGetter): 'attached_to': 'attached_to__pk', 'attached_to__name': 'attached_to__name', 'person_types': 'person_types__pk__in', - 'ishtaruser__isnull': 'ishtaruser__isnull' + 'ishtaruser__isnull': 'ishtaruser__isnull', } COL_LABELS = { 'attached_to__name': _(u"Organization") @@ -2525,6 +2527,12 @@ class Person(Address, Merge, OwnPerms, ValueGetter): def person_types_list(self): return u", ".join([unicode(pt) for pt in self.person_types.all()]) + profiles_list_lbl = _(u"Profiles") + + @property + def profiles_list(self): + return u", ".join([unicode(p) for p in self.profiles.all()]) + def generate_merge_key(self): if self.name and self.name.strip(): self.merge_key = slugify(self.name.strip()) + \ -- cgit v1.2.3