Exemplo n.º 1
0
 def isShowable(self, obj, layoutType):
     res = Field.isShowable(self, obj, layoutType)
     if not res: return res
     # We add here specific Ref rules for preventing to show the field under
     # some inappropriate circumstances.
     if (layoutType == 'edit') and \
        (self.mayAdd(obj) or not self.link): return False
     if self.isBack:
         if layoutType == 'edit': return False
         else: return getattr(obj.aq_base, self.name, None)
     return res
Exemplo n.º 2
0
 def isShowable(self, obj, layoutType):
     res = Field.isShowable(self, obj, layoutType)
     if not res: return res
     # We add here specific Ref rules for preventing to show the field under
     # some inappropriate circumstances.
     if (layoutType == 'edit') and \
        (self.mayAdd(obj) or not self.link):
         return False
     if self.isBack:
         if layoutType == 'edit': return False
         else: return getattr(obj.aq_base, self.name, None)
     return res
Exemplo n.º 3
0
 def isShowable(self, obj, layoutType):
     if layoutType == 'edit': return
     return Field.isShowable(self, obj, layoutType)