[gen] Added Wrapper.isTemp to know if an object is a temporary one or not.

This commit is contained in:
Gaetan Delannay 2014-07-14 13:21:38 +02:00
parent 811388078f
commit a466513fb3

View file

@ -785,6 +785,10 @@ class AbstractWrapper(object):
return field.isEmptyValue(getattr(obj, name)) return field.isEmptyValue(getattr(obj, name))
return True return True
def isTemp(self):
'''Is this object a temporary object being created?'''
return self.o.isTemporary()
def link(self, fieldName, obj): def link(self, fieldName, obj):
'''This method links p_obj (which can be a list of objects) to this one '''This method links p_obj (which can be a list of objects) to this one
through reference field p_fieldName.''' through reference field p_fieldName.'''