[gen] Field.indexed, instead of being a Boolean, can be a str, to represent the name of a Zope Index. This way, it is possible to bypass the standard Appy choice for index types, ie for Computed fields whose content may produce any type of value; added missing translation labels in the macro displaying object's history; added default fields Tool.dateFormat and Tool.hourFormat that give application-wide default formats for dates with/without hour; added a table in Config->Users that shows the connected users and the date/time of their last access to the app; added the missing search macro for a Computed field.
This commit is contained in:
parent
21ffa7b46d
commit
699cc8346b
8 changed files with 95 additions and 21 deletions
|
@ -786,6 +786,10 @@ class Type:
|
|||
def getIndexType(self):
|
||||
'''Returns the name of the technical, Zope-level index type for this
|
||||
field.'''
|
||||
# Normally, self.indexed contains a Boolean. If a string value is given,
|
||||
# we consider it to be an index type. It allows to bypass the standard
|
||||
# way to decide what index type must be used.
|
||||
if isinstance(self.indexed, str): return self.indexed
|
||||
return 'FieldIndex'
|
||||
|
||||
def getIndexValue(self, obj, forSearch=False):
|
||||
|
@ -2153,6 +2157,8 @@ class Action(Type):
|
|||
except Exception, e:
|
||||
res = (False, 'An error occurred. %s' % str(e))
|
||||
obj.log(Traceback.get(), type='error')
|
||||
#import transaction
|
||||
#transaction.abort()
|
||||
return res
|
||||
|
||||
def isShowable(self, obj, layoutType):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue