[gen] Added wrapper.getLastEvent, allowing to perform kinds of queries into an object's history.
This commit is contained in:
parent
6206dbe59c
commit
c5930edd2d
2 changed files with 21 additions and 2 deletions
|
@ -49,7 +49,7 @@ class Computed(Field):
|
|||
maxChars=None, colspan=1, method=None, plainText=False,
|
||||
master=None, masterValue=None, focus=False, historized=False,
|
||||
sync=True, mapping=None, label=None, sdefault='', scolspan=1,
|
||||
swidth=None, sheight=None, context={}):
|
||||
swidth=None, sheight=None, context=None):
|
||||
# The Python method used for computing the field value, or a PX.
|
||||
self.method = method
|
||||
# Does field computation produce plain text or XHTML?
|
||||
|
@ -74,7 +74,7 @@ class Computed(Field):
|
|||
obj = obj.appy()
|
||||
ctx = {'obj': obj, 'field': self,
|
||||
'_': obj.translate, 'tool': obj.tool}
|
||||
ctx.update(self.context)
|
||||
if self.context: ctx.update(self.context)
|
||||
return self.method(ctx)
|
||||
else:
|
||||
# self.method is a method that will return the field value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue