[gen] Minor updates.

This commit is contained in:
Gaetan Delannay 2012-08-17 17:12:15 +02:00
parent 31a0268641
commit 61b0ed2fce
3 changed files with 12 additions and 2 deletions

View file

@ -1823,7 +1823,8 @@ class Ref(Type):
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.add or not self.link): return False
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)