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
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
def isShowable(self, obj, layoutType): if layoutType == 'edit': return return Field.isShowable(self, obj, layoutType)