[gen] Added the possibility to display the content of indexes for a given object on its view layout (param 'indexed' in the request).
This commit is contained in:
parent
982ae08997
commit
06c656d278
8 changed files with 66 additions and 8 deletions
|
@ -648,11 +648,7 @@ class Field:
|
|||
if not self.indexed:
|
||||
raise Exception('Field %s: cannot retrieve catalog version of ' \
|
||||
'unindexed field.' % self.name)
|
||||
tool = obj.getTool()
|
||||
indexName = self.getIndexName(usage)
|
||||
catalogBrain = tool.getObject(obj.id, brain=True)
|
||||
index = tool.getApp().catalog.Indexes[indexName]
|
||||
return index.getEntryForObject(catalogBrain.getRID())
|
||||
return obj.getTool().getCatalogValue(obj, self.getIndexName(usage))
|
||||
|
||||
def valueIsInRequest(self, obj, request, name, layoutType):
|
||||
'''Is there a value corresponding to this field in the request? p_name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue