[fix] problem in o2m
[odoo/odoo.git] / addons / auction / report / catalog.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="corporate_defaults.xsl"/>
5         <xsl:import href="rml_template.xsl"/>
6         <xsl:variable name="page_format">a4_normal</xsl:variable>
7
8         <xsl:template match="/">
9                 <xsl:call-template name="rml"/>
10         </xsl:template>
11
12         <xsl:template name="stylesheet">
13                 <paraStyle name="name" fontName="Helvetica-Bold" fontSize="16" alignment="center"/>
14                 <blockTableStyle id="result">
15                          <blockValign value="TOP"/>
16                          <blockAlignment value="RIGHT" start="-1,0" stop="-1,-1"/>
17                          <blockFont name="Helvetica-BoldOblique" size="12" start="0,0" stop="-1,0"/>
18                          <blockBackground colorName="grey" start="0,0" stop="-1,0"/>
19                          <blockTextColor colorName="white" start="0,0" stop="-1,0"/>
20                          <lineStyle kind="LINEBELOW" start="0,0" stop="-1,0"/>
21                 </blockTableStyle>
22         </xsl:template>
23
24         <xsl:template name="story">
25                 <xsl:apply-templates select="catalog"/>
26         </xsl:template>
27
28         <xsl:template match="catalog">
29                 <xsl:apply-templates select="auction"/>
30                 <xsl:apply-templates select="lines"/>
31         </xsl:template>
32
33         <xsl:template match="auction">
34                 <para style="name"><xsl:value-of select="name"/></para>
35         </xsl:template>
36
37         <xsl:template match="lines">
38                 <spacer length="1cm"/>
39                 <blockTable colWidths="1.8cm,12.5cm,3cm" repeatRows="1" style="result">
40                 <tr>
41                         <td t="1">Cat. N.</td>
42                         <td t="1">Description</td>
43                         <td t="1">Estimate</td>
44                 </tr>
45                         <xsl:apply-templates select="line"/>
46                 </blockTable>
47                 <pageBreak/>
48         </xsl:template>
49
50         <xsl:template match="line">
51                 <tr>
52                         <td><xsl:value-of select="lot-number"/></td>
53                         <td>
54                                 <para>
55                                         <xsl:if test="lot-author != ''">
56                                                 <b><xsl:value-of select="lot-author"/></b>
57                                                 <xsl:text>: </xsl:text>
58                                         </xsl:if>
59                                         <b><xsl:value-of select="lot-title"/></b>
60                                         <xsl:text>. </xsl:text>
61                                         <xsl:value-of select="lot-info"/>
62                                 </para>
63                         </td>
64                         <td>
65                                 <xsl:if test="lot-est1!=''">
66                                         <xsl:value-of select="round(lot-est1)"/>
67                                 </xsl:if>
68                                 <xsl:text> / </xsl:text>
69                                 <xsl:if test="lot-est2!=''">
70                                         <xsl:value-of select="round(lot-est2)"/>
71                                 </xsl:if>
72                         </td>
73                 </tr>
74         </xsl:template>
75
76 </xsl:stylesheet>