diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-04-17 13:19:15 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-06-12 08:41:54 +0200 |
commit | 0720f2d7b1a687cd51228562259fedd06a75ca36 (patch) | |
tree | a980ec728dd6190c37d6defb65d2f7bee9507f36 /ishtar_common/models.py | |
parent | c22482bbff62c8cf0dfdac898bb8613005bda877 (diff) | |
download | Ishtar-0720f2d7b1a687cd51228562259fedd06a75ca36.tar.bz2 Ishtar-0720f2d7b1a687cd51228562259fedd06a75ca36.zip |
Show item at the end of person, account, organization wizard. Profile column for account tables. Profiles on person sheet.
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 10 |
1 files changed, 9 insertions, 1 deletions
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()) + \ |