[gen] Pod fields can now be configured with several templates.

This commit is contained in:
Gaetan Delannay 2014-03-19 23:13:31 +01:00
parent 889289407f
commit ecc3a8c39b
10 changed files with 175 additions and 122 deletions

View file

@ -797,14 +797,12 @@ class AbstractWrapper(object):
zopeObj.reindex()
return appyObj
def freeze(self, fieldName, doAction=False):
def freeze(self, fieldName):
'''This method freezes a POD document. TODO: allow to freeze Computed
fields.'''
rq = self.request
field = self.o.getAppyType(fieldName)
if field.type != 'Pod': raise 'Cannot freeze non-Pod field.'
# Perform the related action if required.
if doAction: self.request.set('askAction', True)
# Set the freeze format
rq.set('podFormat', field.freezeFormat)
# Generate the document.