Updated summary subform
authorThierry Florac <thierry.florac@onf.fr>
Tue, 28 Aug 2018 17:54:58 +0200
changeset 900 219bf66b812c
parent 899 69b028b6eecb
child 901 ec5032c0d883
Updated summary subform
src/pyams_content/shared/common/zmi/summary.py
--- a/src/pyams_content/shared/common/zmi/summary.py	Tue Aug 28 17:24:59 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/summary.py	Tue Aug 28 17:54:58 2018 +0200
@@ -9,6 +9,8 @@
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
 #
+from pyams_content.shared.common.interfaces.types import IWfTypedSharedContent
+from pyams_sequence.interfaces import ISequentialIdInfo
 
 __docformat__ = 'restructuredtext'
 
@@ -74,7 +76,13 @@
     tab_label = _("Identity card")
     css_class = 'form-tight'
 
-    fields = field.Fields(Interface)
+    @property
+    def fields(self):
+        fields = field.Fields(IWfSharedContent).select('title')
+        if IWfTypedSharedContent.providedBy(self.context):
+            fields += field.Fields(IWfTypedSharedContent).select('data_type')
+        fields += field.Fields(ISequentialIdInfo).select('public_oid')
+        return fields
 
 
 @adapter_config(name='workflow-waiting-state',