[IMP]: Improvement in string label for auction
[odoo/odoo.git] / addons / auction / report / deposit.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         <xsl:import href="../../base/report/corporate_defaults.xsl"/>
4         <xsl:import href="../../base/report/rml_template.xsl"/>
5
6         <xsl:template match="/">
7                 <xsl:call-template name="rml"/>
8         </xsl:template>
9
10         <xsl:template name="stylesheet">
11                 <blockTableStyle id="accounts">
12                         <blockAlignment value="RIGHT" start="-1,0" stop="-1,-1"/>
13                         <lineStyle kind="LINEABOVE" start="-1,-2" stop="-1,-2"/>
14                 </blockTableStyle>
15
16                 <paraStyle name="conditions" fontName="Helvetica" fontSize="8" alignment="justify"/>
17                 <paraStyle name="name" fontName="Helvetica-Bold"/>
18                 <blockTableStyle id="products">
19                          <blockFont name="Helvetica-BoldOblique" size="12" start="0,0" stop="-1,0"/>
20                          <blockBackground colorName="grey" start="0,0" stop="-1,0"/>
21                          <blockTextColor colorName="white" start="0,0" stop="-1,0"/>
22                          <blockValign value="TOP"/>
23                          <blockAlignment value="RIGHT" start="-2,0" stop="-1,-1"/>
24                          <lineStyle kind="LINEBELOW" colorName="black" start="0,0" stop="-1,0"/>
25                 </blockTableStyle>
26         </xsl:template>
27
28         <xsl:template name="story">
29                 <xsl:apply-templates select="deposit-form"/>
30         </xsl:template>
31
32         <xsl:template match="deposit-form">
33                 <xsl:apply-templates select="deposit"/>
34         </xsl:template>
35
36         <xsl:template match="deposit">
37                 <xsl:apply-templates select="deposit-to"/>
38
39                 <nextFrame/>
40                 <setNextTemplate name="other_pages"/>
41
42                 <para>
43                         <b t="1">Inventory</b>: <i><xsl:value-of select="deposit-name"/></i>
44                 </para><para>
45                         <b t="1">Document type</b>: <i t="1">Deposit Form</i>
46                 </para><para>
47                         <b t="1">Document Number</b>: <i><xsl:value-of select="deposit-id"/></i>
48                 </para><para>
49                         <b t="1">Date</b>: <i><xsl:value-of select="deposit-date"/></i>
50                 </para>
51
52                 <spacer length="1cm" width="1mm"/>
53
54                 <xsl:apply-templates select="deposit-lines"/>
55
56                 <setNextTemplate name="first_page"/>
57                 <pageBreak/>
58         </xsl:template>
59
60         <xsl:template match="deposit-to">
61                 <para style="name">
62                         <xsl:value-of select="corporation/title"/>
63                         <xsl:text> </xsl:text>
64                         <xsl:value-of select="corporation/name"/>
65                 </para>
66                 <para style="name">
67                         <xsl:value-of select="person/title"/>
68                         <xsl:text> </xsl:text>
69                         <xsl:value-of select="person/name"/>
70                 </para>
71                 <para><xsl:value-of select="person/address/street"/></para>
72                 <para><xsl:value-of select="person/address/street2"/></para>
73                 <para><xsl:value-of select="person/address/postcode"/><xsl:text> </xsl:text><xsl:value-of select="person/address/city"/></para>
74 <!--            <para><xsl:value-of select="person/address/state"/></para>-->
75                 <para><xsl:value-of select="person/address/country"/></para>
76
77                 <spacer length="0.4cm" width="1mm"/>
78
79                 <para><b t="1">VAT</b>: <xsl:value-of select="person/vat"/></para>
80         </xsl:template>
81
82         <xsl:template match="deposit-lines">
83                 <blockTable colWidths="1.8cm,9cm,2.3cm,1.5cm,2.3cm" style="products">
84                         <tr>
85                                 <td t="1">Num</td>
86                                 <td t="1">Description</td>
87                                 <td t="1">Auction</td>
88                                 <td t="1">Limit</td>
89                                 <td t="1">Estimate</td>
90                         </tr>
91                         <xsl:for-each select="deposit-line">
92                                 <xsl:sort order="ascending" data-type="number" select="lot-num"/>
93                                 <tr>
94                                         <td><para><xsl:value-of select="lot-num"/></para></td>
95                                         <td><para><xsl:value-of select="name"/></para></td>
96                                         <td><para><xsl:value-of select="lot-date"/></para></td>
97                                         <td>
98                                                 <xsl:if test="lot-limit != ''">
99                                                         <xsl:value-of select="round(lot-limit)"/>
100                                                 </xsl:if>
101                                         </td>
102                                         <td>
103                                                 <xsl:if test="lot-est1 != ''">
104                                                         <xsl:value-of select="round(lot-est1)"/>
105                                                 </xsl:if>
106                                                 <xsl:text> / </xsl:text>
107                                                 <xsl:if test="lot-est2 != ''">
108                                                         <xsl:value-of select="round(lot-est2)"/>
109                                                 </xsl:if>
110                                         </td>
111                                 </tr>
112                         </xsl:for-each>
113                 </blockTable>
114         </xsl:template>
115
116 </xsl:stylesheet>