[gen] Removed obsolete attribute Field.sync.

This commit is contained in:
Gaetan Delannay 2014-03-05 16:19:11 +01:00
parent 5bea4e728b
commit b98da33d47
18 changed files with 43 additions and 79 deletions

View file

@ -215,8 +215,8 @@ class ZopeInstaller:
id=language, title=title)
appyTool.log('Translation object created for "%s".' % language)
# Synchronize, if required, synchronise every Translation object with
# the corresponding "po" file on disk.
# Synchronizes, if required, every Translation object with the
# corresponding "po" file on disk.
if appyTool.loadTranslationsAtStartup:
appFolder = self.config.diskFolder
appName = self.config.PROJECTNAME

View file

@ -685,20 +685,15 @@ class BaseMixin:
if self.isPrincipiaFolderish: return self
return self.getParentNode()
def getFieldValue(self, name, onlyIfSync=False, layoutType=None,
outerValue=None):
'''Returns the database value of field named p_name for p_self.
If p_onlyIfSync is True, it returns the value only if appyType can be
retrieved in synchronous mode.'''
def getFieldValue(self, name, layoutType=None, outerValue=None):
'''Returns the database value of field named p_name for p_self.'''
if layoutType == 'search': return # No object in search screens.
field = self.getAppyType(name)
if not onlyIfSync or (onlyIfSync and field.sync[layoutType]):
# We must really get the field value.
if '*' not in name: return field.getValue(self)
# The field is an inner field from a List.
listName, name, i = name.split('*')
listType = self.getAppyType(listName)
return listType.getInnerValue(self, outerValue, name, int(i))
if '*' not in name: return field.getValue(self)
# The field is an inner field from a List.
listName, name, i = name.split('*')
listType = self.getAppyType(listName)
return listType.getInnerValue(self, outerValue, name, int(i))
def getRequestFieldValue(self, name):
'''Gets the value of field p_name as may be present in the request.'''

View file

@ -12,7 +12,7 @@ class Protos:
# List of attributes that can't be given to a Type constructor
notInit = ('id', 'type', 'pythonType', 'slaves', 'isSelect', 'hasLabel',
'hasDescr', 'hasHelp', 'required', 'filterable', 'validable',
'isBack', 'sync', 'pageName', 'masterName')
'isBack', 'pageName', 'masterName')
@classmethod
def get(self, appyType):
'''Returns a prototype instance for p_appyType.'''