add: multiline report field
This commit is contained in:
		
							parent
							
								
									65ce2d9779
								
							
						
					
					
						commit
						9620ed0c95
					
				
					 2 changed files with 18 additions and 1 deletions
				
			
		|  | @ -61,6 +61,13 @@ | ||||||
|        tal:content="value/title" /></td> |        tal:content="value/title" /></td> | ||||||
| </metal:target> | </metal:target> | ||||||
| 
 | 
 | ||||||
|  | <metal:standard define-macro="multiline"> | ||||||
|  |   <td tal:define="values python:col.getDisplayValues(row)"> | ||||||
|  |     <tal:values repeat="value values"> | ||||||
|  |       <span tal:replace="value" /> | ||||||
|  |     </tal:values> | ||||||
|  |   </td> | ||||||
|  | </metal:standard> | ||||||
| 
 | 
 | ||||||
| <div metal:define-macro="subreport"> | <div metal:define-macro="subreport"> | ||||||
|   <td> |   <td> | ||||||
|  |  | ||||||
|  | @ -167,8 +167,18 @@ class TargetField(RelationField): | ||||||
|         return util.getObjectForUid(value) |         return util.getObjectForUid(value) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| # sub-report stuff | class MultiLineField(Field): | ||||||
|      |      | ||||||
|  |     renderer = 'multiline' | ||||||
|  | 
 | ||||||
|  |     def getValue(self, row): | ||||||
|  |         return self.getRawValue(row) | ||||||
|  | 
 | ||||||
|  |     def getDisplayValues(self, row): | ||||||
|  |         return self.getValue(row) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | # sub-report stuff | ||||||
| class SubReport(ReportInstance): | class SubReport(ReportInstance): | ||||||
| 
 | 
 | ||||||
|     pass |     pass | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 hplattner
						hplattner