[web/views] deleteconf: ignore workflow when displaying composite entities
authorPhilippe Pepiot <philippe.pepiot@logilab.fr>
Wed, 15 Mar 2017 12:01:14 +0100
changeset 12064 0c06abcf4f82
parent 12063 4bcb58aa103a
child 12068 a96c770b2ef1
[web/views] deleteconf: ignore workflow when displaying composite entities This hide TrInfo composite entities when deleting an workflowable entity.
cubicweb/web/views/editforms.py
--- a/cubicweb/web/views/editforms.py	Fri Mar 03 14:06:27 2017 +0100
+++ b/cubicweb/web/views/editforms.py	Wed Mar 15 12:01:14 2017 +0100
@@ -73,10 +73,12 @@
     paginable = False
     # show first level of composite relations in a treeview
     show_composite = False
+    show_composite_skip_rtypes = set('wf_info_for',)
 
-    @staticmethod
-    def _iter_composite_entities(entity, limit=None):
+    def _iter_composite_entities(self, entity, limit=None):
         for rdef, role in entity.e_schema.composite_rdef_roles:
+            if rdef.rtype in self.show_composite_skip_rtypes:
+                continue
             for centity in entity.related(
                 rdef.rtype, role, limit=limit
             ).entities():