[fix] problem in o2m
[odoo/odoo.git] / addons / auction / report / lots_list_landscape.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:template match="/">
4                 <xsl:apply-templates select="lots"/>
5         </xsl:template>
6
7         <xsl:template match="lots">
8                 <document xmlns:fo="http://www.w3.org/1999/XSL/Format">
9                         <template leftMargin="2.0cm" rightMargin="2.0cm" topMargin="2.0cm" bottomMargin="2.0cm" title="" author="Generated by Open ERP" allowSplitting="20" pageSize="29.7cm,21cm">
10
11                                 <pageTemplate id="all">
12                                         <pageGraphics/>
13                                         <frame id="list" x1="1.0cm" y1="1.0cm" width="27.7cm" height="19cm"/>
14                                 </pageTemplate>
15                         </template>
16
17                         <stylesheet>
18                                 <paraStyle name="small" fontName="Courier" fontSize="12" spaceBefore="0mm" spaceAfter="0mm"/>
19                                 <paraStyle name="verysmall" fontSize="11" fontName="Courier" spaceBefore="0mm" spaceAfter="0mm"/>
20                                 <paraStyle name="smallest" fontSize="10" fontName="Courier" spaceBefore="-0.5mm" spaceAfter="-0.5mm"/>
21
22                                 <blockTableStyle id="left">
23                                         <blockValign value="TOP"/>
24                                         <blockAlignment value="LEFT"/>
25                                         <blockFont name="Helvetica-Bold" size="10"/>
26                                         <blockTextColor colorName="black"/>
27                                         <lineStyle kind="LINEABOVE" thickness="0.5" colorName="black" start="0,0" stop="-1,0"/>
28                                         <lineStyle kind="LINEBELOW" thickness="0.5" colorName="black"/>
29                                         <blockBackground colorName="(1,1,1)" start="0,0" stop="-1,-1"/>
30                                         <blockBackground colorName="(0.88,0.88,0.88)" start="0,0" stop="-1,0"/>
31                                 </blockTableStyle>
32                         </stylesheet>
33
34                         <story>
35                                 <blockTable repeatRows="1" style="left" colWidths="1.3cm,11.0cm,2.3cm,1.6cm,6.5cm,2.3cm,2cm">
36                                         <tr>
37                                                 <td>
38                                                         <para style="small"><b t="1">Cat. N.</b></para>
39                                                 </td><td>
40                                                         <para style="small"><b t="1">Description</b></para>
41                                                 </td><td>
42                                                         <para style="small"><b t="1">Est.</b></para>
43                                                 </td><td>
44                                                         <para style="small"><b t="1">Limit</b></para>
45                                                 </td><td>
46                                                         <para style="small"><b t="1">Orders</b></para>
47                                                 </td><td>
48                                                         <para style="small"><b t="1">Inv, Name</b></para>
49                                                 </td><td>
50                                                         <para style="small"><b t="1">Buyer, Price</b></para>
51                                                 </td>
52                                         </tr>
53                                         <xsl:apply-templates select="lot"/>
54                                 </blockTable>
55                         </story>
56                 </document>
57         </xsl:template>
58
59         <xsl:template match="lot">
60                 <tr>
61                         <td>
62                                 <para style="verysmall"><xsl:value-of select="lot_num"/></para>
63                         </td><td>
64                                 <para style="verysmall"><b><xsl:value-of select="artist"/></b></para>
65                                 <para style="verysmall"><b><xsl:value-of select="lot_desc0"/></b></para>
66                                 <para style="verysmall"><xsl:value-of select="lot_desc"/></para>
67                         </td><td>
68                                 <para style="verysmall">
69                                         <xsl:if test="lot_est1 != ''">
70                                                 <xsl:value-of select="round(lot_est1)"/>
71                                         </xsl:if>
72                                         <xsl:text>-</xsl:text>
73                                         <xsl:if test="lot_est2 != ''">
74                                                 <xsl:value-of select="round(lot_est2)"/>
75                                         </xsl:if>
76                                 </para>
77                         </td><td>
78                                 <xsl:if test="lot_limit != ''">
79                                         <para style="verysmall">
80                                                 <b><xsl:value-of select="round(lot_limit)"/></b>
81                                         </para>
82                                 </xsl:if>
83                                 <xsl:if test="lot_limit_net != ''">
84                                         <para style="verysmall">
85                                                 <b t="1">NET</b>
86                                         </para>
87                                 </xsl:if>
88                         </td><td>
89                                 <xsl:for-each select="bid">
90                                         <xsl:sort order="descending" data-type="number" select="bid_prix"/>
91                                         <para style="smallest">
92                                                 <xsl:choose>
93                                                         <xsl:when test="bid_tel_ok='1'">
94                                                                 <b t="1">TEL:</b>
95                                                         </xsl:when>
96                                                         <xsl:otherwise t="1">
97                                                                 BID:
98                                                         </xsl:otherwise>
99                                                 </xsl:choose>
100                                                 <xsl:value-of select="bid_name"/>
101                                                 <xsl:text>(</xsl:text><xsl:value-of select="bid_id"/><xsl:text>)</xsl:text>
102                                                 <xsl:if test="round(bid_prix)&gt;0">
103                                                         <xsl:text> </xsl:text><b><xsl:value-of select="round(bid_prix)"/><xsl:text> EUR</xsl:text></b>
104                                                 </xsl:if>
105                                                 <xsl:if test="bid_tel_ok='1'">
106                                                         <b><xsl:text t="1">, TEL:</xsl:text><xsl:value-of select="bid_tel"/></b>
107                                                 </xsl:if>
108                                         </para>
109                                 </xsl:for-each>
110                         </td><td>
111                                 <para style="verysmall">
112                                         <xsl:value-of select="deposit_num"/>
113                                         <xsl:text> </xsl:text><xsl:value-of select="substring(lot_seller_ref,0,5)"/>
114                                         <xsl:text> </xsl:text><xsl:value-of select="substring(lot_seller,0,9)"/>
115                                 </para>
116                         </td><td>
117                                 <para style="verysmall">
118                                         <xsl:value-of select="buyer_login"/>
119                                         <xsl:if test="obj_price &gt; 0">
120                                                 <xsl:text>, </xsl:text>
121                                                 <xsl:value-of select="obj_price"/>
122                                         </xsl:if>
123                                 </para>
124                         </td>
125                 </tr>
126         </xsl:template>
127 </xsl:stylesheet>