Added <hr> tag for reports.

bzr revid: jvo@tinyerp.com-20081022095501-hcergg2qbeotmczv
This commit is contained in:
Jay Vora 2008-10-22 15:25:01 +05:30
parent 6abbaf87a0
commit 8651df61bd
1 changed files with 6 additions and 0 deletions

View File

@ -698,6 +698,12 @@ class _rml_flowable(object):
return CurrentFrameFlowable(str(node.getAttribute('name')))
elif node.localName == 'frameEnd':
return EndFrameFlowable()
elif node.localName == 'hr':
width_hr=node.hasAttribute('width') and node.getAttribute('width') or '100%'
color_hr=node.hasAttribute('color') and node.getAttribute('color') or 'black'
thickness_hr=node.hasAttribute('thickness') and node.getAttribute('thickness') or 1
lineCap_hr=node.hasAttribute('lineCap') and node.getAttribute('lineCap') or 'round'
return platypus.flowables.HRFlowable(width=width_hr,color=color.get(color_hr),thickness=float(thickness_hr),lineCap=str(lineCap_hr))
else:
sys.stderr.write('Warning: flowable not yet implemented: %s !\n' % (node.localName,))
return None