define standard method useRowProperty() in a central place
This commit is contained in:
parent
97da6c9d01
commit
14abba0e3d
1 changed files with 3 additions and 5 deletions
|
@ -27,7 +27,6 @@ from cybertools.composer.interfaces import IInstance
|
|||
from cybertools.composer.report.base import BaseQueryCriteria
|
||||
|
||||
|
||||
|
||||
class BaseRow(object):
|
||||
|
||||
def __init__(self, context, parent):
|
||||
|
@ -36,10 +35,6 @@ class BaseRow(object):
|
|||
self.data = {}
|
||||
self.sequenceNumber = 0
|
||||
|
||||
def xx__getattr__(self, attr):
|
||||
f = self.parent.context.fields[attr]
|
||||
return f.getValue(self)
|
||||
|
||||
def getRawValue(self, attr):
|
||||
return self.data.get(attr)
|
||||
|
||||
|
@ -62,6 +57,9 @@ class Row(BaseRow):
|
|||
def displayedColumns(self):
|
||||
return self.parent.context.getActiveOutputFields()
|
||||
|
||||
def useRowProperty(self, attr):
|
||||
return getattr(self, attr)
|
||||
|
||||
|
||||
class GroupHeaderRow(BaseRow):
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue