[IMP] mrp: Improved search views according to checklist guidelines.
[odoo/odoo.git] / addons / mrp / report / price.xsl
1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
3
4         <xsl:import href="custom_default.xsl"/>
5         <xsl:import href="custom_rml.xsl"/>
6
7         <xsl:template match="/">
8                 <xsl:call-template name="rml"/>
9         </xsl:template>
10
11         <!-- stylesheet -->
12
13         <xsl:template name="stylesheet">
14                 <paraStyle name="title" fontName="Helvetica-Bold" fontSize="22" alignment="center"/>
15                 <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
16                 <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"/>
17                 <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/>
18                 <paraStyle name="terp_tblheader_Details_Right_bold" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/>
19
20                 <blockTableStyle id="header">
21                         <blockValign value="TOP"/>
22                          <blockAlignment value="RIGHT"/>
23                          <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,-1"/>
24                 </blockTableStyle>
25                 <blockTableStyle id="lines">
26                         <blockValign value="TOP"/>
27                          <blockAlignment value="RIGHT"/>
28                          <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1"/>
29                 </blockTableStyle>
30                 <blockTableStyle id="total">
31                         <blockValign value="TOP"/>
32                         <blockAlignment value="RIGHT"/>
33                         <lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="0,0" stop="-1,-1"/>
34                 </blockTableStyle>
35                 <blockTableStyle id="sub_total">
36                         <blockValign value="TOP"/>
37                          <blockAlignment value="RIGHT"/>
38                          <lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="0,0" stop="-1,-1"/>
39                 </blockTableStyle>
40 </xsl:template>
41
42         <xsl:template name="story">
43                 <xsl:apply-templates select="report"/>
44         </xsl:template>
45
46         <xsl:template match="report">
47                 <xsl:apply-templates select="config"/>
48                 <xsl:apply-templates select="title"/>
49                 <xsl:apply-templates select="lines"/>
50         </xsl:template>
51
52         <xsl:template match="config">
53                 <xpre style="title">
54                 <xsl:value-of select="report-header"/>
55                 </xpre>
56                 <spacer length="1cm" width="2mm"/>
57         </xsl:template>
58
59         <xsl:template match="title">
60                 <para style="title">
61                 <xsl:value-of select="."/>
62                 </para>
63                 <spacer length="1cm" width="2mm"/>
64         </xsl:template>
65
66
67         <xsl:template match="header">
68                 <tr>
69                 <xsl:for-each select="field">
70                         <td>
71                         <para style="terp_tblheader_General">
72                         <xsl:value-of select="."/>
73                         </para>
74                         </td>
75                 </xsl:for-each>
76                 </tr>
77         </xsl:template>
78
79         <xsl:template match="lines">
80
81         <xsl:apply-templates select="title"/>
82                 <blockTable>
83                 <xsl:attribute name="style"><xsl:value-of select="@style"/></xsl:attribute>
84                  <xsl:attribute name="colWidths">
85                          <xsl:value-of select="../config/tableSize"/>
86                  </xsl:attribute>
87
88                 <xsl:apply-templates select="row"/>
89
90                 </blockTable>
91
92                 <xsl:if test="@style!='header'">
93                         <spacer length="2mm" width="2mm"/>
94
95                 </xsl:if>
96                 <xsl:if test="@style='total'">
97                         <xsl:if test="position() &lt; last()">
98                                 <pageBreak/>
99                         </xsl:if>
100                 </xsl:if>
101
102         </xsl:template>
103
104         <xsl:template match="row">
105                 <tr>
106                 <xsl:apply-templates select="col"/>
107                 </tr>
108         </xsl:template>
109
110         <xsl:template match="col">
111                 <td>
112                         <xsl:choose>
113                                 <xsl:when test="@para='yes'">
114                                         <xsl:choose>
115                                                 <xsl:when test="@tree='yes'">
116                                                         <para style="terp_default_8">
117                                                                 <xsl:attribute name="leftIndent"><xsl:value-of select="@space"/></xsl:attribute>
118                                                                 <xsl:value-of select="."/>
119                                                         </para>
120                                                 </xsl:when>
121                                                 <xsl:otherwise>
122                                                         <para style="terp_default_8">
123                                                                 <xsl:value-of select="."/>
124                                                         </para>
125                                                 </xsl:otherwise>
126                                         </xsl:choose>
127                                 </xsl:when>
128                                 <xsl:when test="@f='yes'">
129                                         <para style="terp_tblheader_Details_Right">
130                                                 <xsl:value-of select="."/>
131                                         </para>
132                                 </xsl:when>
133                                 <xsl:when test="@t='yes'">
134                                         <para style="terp_tblheader_Details_Right_bold">
135                                                 <xsl:value-of select="."/>
136                                         </para>
137                                 </xsl:when>
138                                 <xsl:otherwise>
139                                         <para style="terp_tblheader_General">
140                                                 <xsl:value-of select="."/>
141                                         </para>
142                                 </xsl:otherwise>
143                         </xsl:choose>
144                 </td>
145         </xsl:template>
146
147 </xsl:stylesheet>