Launchpad automatic translations update.
[odoo/odoo.git] / addons / hr_attendance / report / timesheet.xsl
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">
5
6         <xsl:template match="/">
7         <xsl:call-template name="rml" />
8     </xsl:template>
9
10
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">
15                                         <pageGraphics>
16                                                 <drawRightString x="19.0cm" y="26.0cm"><xsl:value-of select="date"/></drawRightString>
17                                         </pageGraphics>
18                                         <frame id="col1" x1="2.0cm" y1="2.5cm" width="22.7cm" height="18cm"/>
19                                 </pageTemplate>
20                         </template>
21                         
22                         <stylesheet>
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"/>
29                        </blockTableStyle>
30                         </stylesheet>
31
32                         <story>
33                                 <xsl:call-template name="story"/>
34                         </story>
35                 </document>
36     </xsl:template>
37
38     <xsl:template name="story">
39         <xsl:apply-templates select="report/user"/>
40     </xsl:template>
41
42     <xsl:template match="user">
43         <para>
44             <b>Name:</b>
45             <i><xsl:value-of select="name" /></i>
46         </para>
47         <blockTable colWidths="4cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm,1.5cm" style="week">
48             <tr>
49                 <td></td>
50                 <td>Mon</td>
51                 <td>Tue</td>
52                 <td>Wed</td>
53                 <td>Thu</td>
54                 <td>Fri</td>
55                 <td>Sat</td>
56                 <td>Sun</td>
57                 <td>Tot</td>
58             </tr>
59             <xsl:for-each select="week">
60                 <tr></tr>
61                 <tr>
62                     <td>Week:</td>
63                     <td></td>
64                     <td>from <xsl:value-of select="weekstart" /> to <xsl:value-of select="weekend" /></td>
65                 </tr>
66                 <tr>
67                     <td>Worked hours</td>
68                     <td>
69                         <xsl:choose>
70                             <xsl:when test="Monday/workhours">
71                                 <xsl:value-of select="Monday/workhours" />
72                             </xsl:when>
73                             <xsl:otherwise>0</xsl:otherwise>
74                         </xsl:choose>                                                   
75                     </td>
76                     <td>
77                         <xsl:choose>
78                             <xsl:when test="Tuesday/workhours">
79                                 <xsl:value-of select="Tuesday/workhours" />
80                             </xsl:when>
81                             <xsl:otherwise>0</xsl:otherwise>
82                         </xsl:choose>                                                   
83                     </td>
84                     <td>
85                         <xsl:choose>
86                             <xsl:when test="Wednesday/workhours">
87                                 <xsl:value-of select="Wednesday/workhours" />
88                             </xsl:when>
89                             <xsl:otherwise>0</xsl:otherwise>
90                         </xsl:choose>                                                   
91                     </td>
92                     <td>
93                         <xsl:choose>
94                             <xsl:when test="Thursday/workhours">
95                                 <xsl:value-of select="Thursday/workhours" />
96                             </xsl:when>
97                             <xsl:otherwise>0</xsl:otherwise>
98                         </xsl:choose>                                                   
99                     </td>
100                     <td>
101                         <xsl:choose>
102                             <xsl:when test="Friday/workhours">
103                                 <xsl:value-of select="Friday/workhours" />
104                             </xsl:when>
105                             <xsl:otherwise>0</xsl:otherwise>
106                         </xsl:choose>                                                   
107                     </td>
108                     <td>
109                         <xsl:choose>
110                             <xsl:when test="Saturday/workhours">
111                                 <xsl:value-of select="Saturday/workhours" />
112                             </xsl:when>
113                             <xsl:otherwise>0</xsl:otherwise>
114                         </xsl:choose>                                                   
115                     </td>
116                     <td>
117                         <xsl:choose>
118                             <xsl:when test="Sunday/workhours">
119                                 <xsl:value-of select="Sunday/workhours" />
120                             </xsl:when>
121                             <xsl:otherwise>0</xsl:otherwise>
122                         </xsl:choose>                                                   
123                     </td>
124                     <td>
125                         <xsl:value-of select="total/worked" />
126                     </td>
127                 </tr>
128             </xsl:for-each>
129         </blockTable>
130     </xsl:template>
131 </xsl:stylesheet>