web/views/primary.py
branchstable
changeset 5065 01d85f3a3d9e
parent 4742 fac80328a6a3
child 5180 25c3269b2232
equal deleted inserted replaced
5064:494ae4ad4a14 5065:01d85f3a3d9e
    13 from logilab.mtconverter import xml_escape
    13 from logilab.mtconverter import xml_escape
    14 
    14 
    15 from cubicweb import Unauthorized
    15 from cubicweb import Unauthorized
    16 from cubicweb.selectors import match_kwargs
    16 from cubicweb.selectors import match_kwargs
    17 from cubicweb.view import EntityView
    17 from cubicweb.view import EntityView
    18 from cubicweb.schema import display_name
    18 from cubicweb.schema import VIRTUAL_RTYPES, display_name
    19 from cubicweb.web import uicfg
    19 from cubicweb.web import uicfg
    20 
    20 
    21 
    21 
    22 class PrimaryView(EntityView):
    22 class PrimaryView(EntityView):
    23     """the full view of an non final entity"""
    23     """the full view of an non final entity"""
   200 
   200 
   201     def _section_def(self, entity, where):
   201     def _section_def(self, entity, where):
   202         rdefs = []
   202         rdefs = []
   203         eschema = entity.e_schema
   203         eschema = entity.e_schema
   204         for rschema, tschemas, role in eschema.relation_definitions(True):
   204         for rschema, tschemas, role in eschema.relation_definitions(True):
       
   205             if rschema in VIRTUAL_RTYPES:
       
   206                 continue
   205             matchtschemas = []
   207             matchtschemas = []
   206             for tschema in tschemas:
   208             for tschema in tschemas:
   207                 section = self.rsection.etype_get(eschema, rschema, role,
   209                 section = self.rsection.etype_get(eschema, rschema, role,
   208                                                   tschema)
   210                                                   tschema)
   209                 if section == where:
   211                 if section == where: