fix subreport field definition - needs a reportFactory parameter
This commit is contained in:
		
							parent
							
								
									7bf87c15ac
								
							
						
					
					
						commit
						a30ed80e16
					
				
					 2 changed files with 13 additions and 13 deletions
				
			
		| 
						 | 
				
			
			@ -187,4 +187,4 @@ class SubReportField(Field):
 | 
			
		|||
 | 
			
		||||
    def getValue(self, row):
 | 
			
		||||
        ri = self.getReportInstance(row)
 | 
			
		||||
        return ResultSet(ri, ri.getResults())
 | 
			
		||||
        return ri.getResults()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -130,18 +130,6 @@ state = Field('state', u'State',
 | 
			
		|||
                description=u'The state of the work.',
 | 
			
		||||
                executionSteps=['query', 'output'])
 | 
			
		||||
 | 
			
		||||
# task/event report fields
 | 
			
		||||
 | 
			
		||||
taskTitle = UrlField('title', u'Title',
 | 
			
		||||
                description=u'The short description of the task.',
 | 
			
		||||
                executionSteps=['output'])
 | 
			
		||||
taskDescription = TextField('description', u'Description',
 | 
			
		||||
                description=u'The long description of the task.',
 | 
			
		||||
                executionSteps=['output'])
 | 
			
		||||
workItems = SubReportField('workItems', u'Work Items',
 | 
			
		||||
                description=u'A list of work items belonging to the task.',
 | 
			
		||||
                executionSteps=['output'])
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# basic definitions and work report instance
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -249,6 +237,18 @@ class WorkReportInstance(ReportInstance):
 | 
			
		|||
 | 
			
		||||
# meeting minutes
 | 
			
		||||
 | 
			
		||||
taskTitle = UrlField('title', u'Title',
 | 
			
		||||
                description=u'The short description of the task.',
 | 
			
		||||
                executionSteps=['output'])
 | 
			
		||||
taskDescription = TextField('description', u'Description',
 | 
			
		||||
                description=u'The long description of the task.',
 | 
			
		||||
                executionSteps=['output'])
 | 
			
		||||
workItems = SubReportField('workItems', u'Work Items',
 | 
			
		||||
                description=u'A list of work items belonging to the task.',
 | 
			
		||||
                reportFactory=WorkReportInstance,
 | 
			
		||||
                executionSteps=['output'])
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class TaskRow(BaseRow):
 | 
			
		||||
 | 
			
		||||
    pass
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue