# HG changeset patch # User Thierry Florac # Date 1538744426 -7200 # Node ID 91cd0cc00ab5df8896550a5e34674a01102d9176 # Parent a219e2e207797e2542a9d42677c10a969c28b3b6 Added field_names attribute to typed shared content diff -r a219e2e20779 -r 91cd0cc00ab5 src/pyams_content/shared/common/interfaces/types.py --- a/src/pyams_content/shared/common/interfaces/types.py Wed Oct 03 19:24:39 2018 +0200 +++ b/src/pyams_content/shared/common/interfaces/types.py Fri Oct 05 15:00:26 2018 +0200 @@ -130,6 +130,8 @@ def get_data_type(self): """Get associated data type""" + field_names = Attribute("Selected data type field names") + class IWfTypedSharedContentPortalContext(IWfTypedSharedContent, IBaseContentPortalContext): """Shared content with portal support""" diff -r a219e2e20779 -r 91cd0cc00ab5 src/pyams_content/shared/common/types.py --- a/src/pyams_content/shared/common/types.py Wed Oct 03 19:24:39 2018 +0200 +++ b/src/pyams_content/shared/common/types.py Fri Oct 05 15:00:26 2018 +0200 @@ -133,6 +133,12 @@ manager = ITypedDataManager(tool) return manager.get(self.data_type) + @property + def field_names(self): + data_type = self.get_data_type() + if data_type is not None: + return data_type.field_names + @subscriber(IObjectAddedEvent, context_selector=IWfTypedSharedContent) def handle_added_typed_shared_content(event):