1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:fo="http://www.w3.org/1999/XSL/Format">
6 <xsl:template match="/">
7 <xsl:call-template name="rml" />
11 <xsl:template name="rml">
12 <document filename="timesheet.pdf">
13 <template pageSize="29.7cm,21cm" leftMargin="2.0cm" rightMargin="2.0cm" topMargin="2.0cm" bottomMargin="2.0cm" title="Timesheets" author="Generated by Open ERP, Fabien Pinckaers" allowSplitting="20">
14 <pageTemplate id="first">
16 <drawRightString x="19.0cm" y="26.0cm"><xsl:value-of select="date"/></drawRightString>
18 <frame id="col1" x1="2.0cm" y1="2.5cm" width="22.7cm" height="18cm"/>
23 <blockTableStyle id="week">
24 <blockFont name="Helvetica-BoldOblique" size="12" start="0,0" stop="-1,0"/>
25 <blockBackground colorName="grey" start="0,0" stop="-1,0"/>
26 <blockTextColor colorName="red" start="-1,0" stop="-1,-1"/>
27 <lineStyle kind="LINEBEFORE" colorName="grey" start="-1,0" stop="-1,-1"/>
28 <blockValign value="TOP"/>
33 <xsl:call-template name="story"/>
38 <xsl:template name="story">
39 <xsl:apply-templates select="report/user"/>
42 <xsl:template match="user">
45 <i><xsl:value-of select="name" /></i>
47 <blockTable colWidths="4cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm" style="week">
59 <xsl:for-each select="week">
64 <td>from <xsl:value-of select="weekstart" /> to <xsl:value-of select="weekend" /></td>
70 <xsl:when test="Monday/workhours">
71 <xsl:value-of select="Monday/workhours" />
73 <xsl:otherwise>0</xsl:otherwise>
78 <xsl:when test="Tuesday/workhours">
79 <xsl:value-of select="Tuesday/workhours" />
81 <xsl:otherwise>0</xsl:otherwise>
86 <xsl:when test="Wednesday/workhours">
87 <xsl:value-of select="Wednesday/workhours" />
89 <xsl:otherwise>0</xsl:otherwise>
94 <xsl:when test="Thursday/workhours">
95 <xsl:value-of select="Thursday/workhours" />
97 <xsl:otherwise>0</xsl:otherwise>
102 <xsl:when test="Friday/workhours">
103 <xsl:value-of select="Friday/workhours" />
105 <xsl:otherwise>0</xsl:otherwise>
110 <xsl:when test="Saturday/workhours">
111 <xsl:value-of select="Saturday/workhours" />
113 <xsl:otherwise>0</xsl:otherwise>
118 <xsl:when test="Sunday/workhours">
119 <xsl:value-of select="Sunday/workhours" />
121 <xsl:otherwise>0</xsl:otherwise>
125 <xsl:value-of select="total/worked" />