~openerp-dev/openobject-addons/6.0-opw-5629-jvo

« back to all changes in this revision

Viewing changes to auction/report/catalog2.xsl

  • Committer: Fabien Pinckaers
  • Date: 2008-08-24 14:45:43 UTC
  • Revision ID: fp@tinyerp.com-20080824144543-33o2j8ddmvaxx4ce
added from extra-addons

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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"  xmlns:date="http://exslt.org/dates-and-times"extension-element-prefixes="date">
 
3
 
 
4
 
 
5
<xsl:template match="report">
 
6
<document>
 
7
 
 
8
<template>
 
9
<!--    <pageTemplate id="first">-->
 
10
<!--            <pageGraphics>-->
 
11
<!--                    <stroke color="(0.6,0.3,0.1)"/>-->
 
12
<!--                    <fill color="(0.6,0.3,0.1)"/>-->
 
13
 
 
14
                        <image x="7cm" y="25cm" file="/home/tiny/terp/4.2/server/bin/addons/auction/report/images/aeko_logo.jpg"/>
 
15
                                                <image x="7cm" y="25cm" file="/home/pinky/code/terp/branches/extra_addons/trunk/auction/report/images/flagey_logo.jpg"/>
 
16
                        <lines>1cm 3.0cm 20cm 3.0cm</lines>
 
17
                        <setFont name="Helvetica" size="15"/>
 
18
                        <drawCentredString x="105mm" y="2.2cm">Hotel des ventes Flagey</drawCentredString>
 
19
                        <setFont name="Helvetica" size="11"/>
 
20
                        <drawCentredString x="105mm" y="1.6cm">Rue du Nid, 4 - B-1050 Bruxelles - Tel: 02/644.97.67</drawCentredString>
 
21
                        <drawCentredString x="105mm" y="1.0cm">Web: Flagey.com - Mail: info@flagey.com - Fax: 02.646.32.35</drawCentredString>
 
22
 
 
23
 
 
24
                        <fill color="(0.2,0.2,0.2)"/>
 
25
                        <stroke color="(0.2,0.2,0.2)"/>
 
26
 
 
27
<!--            </pageGraphics>-->
 
28
<!--            <frame id="column" x1="2.0cm" y1="6cm" width="18cm" height="18cm"/>-->
 
29
<!--    </pageTemplate>-->
 
30
        <pageTemplate id="first">
 
31
                <pageGraphics>
 
32
<!--                    <image x="1.0cm" y="27.3cm" file="/home/tiny/terp/4.2/server/bin/addons/auction/report/images/flagey_head.png"/>-->
 
33
-                       <image x="1.0cm" y="27.3cm" file="/home/pinky/code/terp/branches/extra_addons/trunk/auction/report/images/flagey_logo.jpg"/>
 
34
                        <drawRightString x="19.0cm" y="27.6cm"> Vente  antiquitée le  <xsl:value-of select="date:day-name(catalog/AuctionDate1)"/> &#160;<xsl:value-of select="date:day-in-month(catalog/AuctionDate1)"/>&#160;<xsl:value-of select="date:month-name(catalog/AuctionDate1)"/> &#160;<xsl:value-of select="date:year(catalog/AuctionDate1)"/></drawRightString>-->
 
35
                        <lineMode width="1mm"/>
 
36
                        <setFont name="Helvetica" size="26"/>
 
37
<!--                    <drawString x="10mm" y="27.8cm">Flagey.com</drawString>-->
 
38
                        <fill color="(0.2,0.2,0.2)"/>
 
39
                        <stroke color="#2b24b6"/>
 
40
                        <lineMode width="0.5mm"/>
 
41
                        <lines>1cm 1.6cm 20cm 1.6cm</lines>
 
42
                        <lines>1.0cm 27.3cm 20cm 27.3cm</lines>
 
43
 
 
44
                        <setFont name="Helvetica" size="12"/>
 
45
                        <drawString x="10mm" y="1.0cm">www.flagey.com</drawString>
 
46
                        <drawCentredString x="105mm" y="1.0cm">Tel: 02.644.97.67 - Fax: 02.646.32.35</drawCentredString>
 
47
                        <drawRightString x="200mm" y="1.0cm">info@flagey.com</drawRightString>
 
48
                </pageGraphics>
 
49
                <frame id="column" x1="1cm" y1="1.5cm" width="9.4cm" height="25.5cm"/>
 
50
                <frame id="column" x1="10.8cm" y1="1.5cm" width="9.4cm" height="25.5cm"/>
 
51
        </pageTemplate>
 
52
</template>
 
53
<stylesheet>
 
54
        <paraStyle name="slogan1" fontName="Times-Roman" fontSize="11" alignment="left" spaceBefore="0.0" spaceAfter="0.0"/>
 
55
         <paraStyle name="slogan2" fontName="Times-Roman" fontSize="9" alignment="right" spaceBefore="0.0" spaceAfter="0.0"/>
 
56
         <paraStyle name="slogan5"  alignment="right" />
 
57
                <paraStyle name="slogan" fontName="Times New Roman-Italic" fontSize="11" alignment="left" spaceBefore="0.0" spaceAfter="0.0"/>
 
58
         <paraStyle name="slogan3"  xml:lang="en-fr" fontName="Times-Roman" fontSize="16" alignment="center" spaceAfter="0.5" />
 
59
          <paraStyle name="slogan4" fontName="Helvetica" fontSize="10" alignment="right" spaceBefore="0.0"/>
 
60
        <paraStyle name="footnote" fontName="Helvetica" fontSize="10" alignment="center" />
 
61
        <paraStyle name="note" fontName="Helvetica" fontSize="8" leftIndent="3mm"/>
 
62
        <paraStyle name="homehead" fontName="Helvetica" fontSize="12" alignment="center"/>
 
63
        <paraStyle name="artist" fontName="Helvetica-Bold"/>
 
64
        <paraStyle name="prodtitle" fontName="Helvetica-BoldOblique" fontSize="8"/>
 
65
        <blockTableStyle id="infos">
 
66
                <blockValign value="TOP"/>
 
67
                <blockTopPadding value="0"/>
 
68
                <blockBottomPadding value="0"/>
 
69
        </blockTableStyle>
 
70
        <blockTableStyle id="imagestyle">
 
71
 
 
72
         <blockHalign value="right"/>
 
73
        <blockAlignment value="RIGHT" start="-1,0" stop="-1,-1"/>
 
74
 
 
75
 
 
76
        </blockTableStyle>
 
77
 
 
78
        <blockTableStyle id="product1">
 
79
                <blockValign value="TOP"/>
 
80
<!--              <blockAlignment value="RIGHT" start="1,0" stop="-1,0"/>-->
 
81
                                 <blockAlignment value="RIGHT"/>
 
82
 
 
83
                <blockTopPadding legnth="0"  start="0,0" stop="0,-1" />
 
84
                <blockLeftPadding legnth="0"  start="0,0" stop="0,-1" />
 
85
 
 
86
 
 
87
                <blockAlignment value="CENTER" start="0,0" stop="0,-1"/>
 
88
        </blockTableStyle>
 
89
        <blockTableStyle id="donation">
 
90
                <blockFont name="Helvetica-BoldOblique" size="24" start="0,0" stop="-1,0"/>
 
91
                <blockAlignment value="RIGHT" start="-1,0" stop="-1,-1"/>
 
92
                <lineStyle kind="LINEBELOW" start="0,0" stop="-1,0"/>
 
93
        </blockTableStyle>
 
94
</stylesheet>
 
95
 
 
96
        <story>
 
97
 
 
98
<!--<setNextTemplate name="others"/>-->
 
99
<!--    <pageBreak/>-->
 
100
        <xsl:apply-templates select="catalog/products"/>
 
101
</story>
 
102
</document>
 
103
</xsl:template>
 
104
 
 
105
 
 
106
<xsl:template match="products">
 
107
                        <xsl:apply-templates select="product">
 
108
                                <xsl:sort order="ascending" data-type="number" select="infos/lot_num"/>
 
109
                        </xsl:apply-templates>
 
110
 
 
111
</xsl:template>
 
112
 
 
113
<xsl:template match="product">
 
114
<!--        <xsl:if test="newpage">-->
 
115
<!--                <condPageBreak height="20cm"/>-->
 
116
<!--        </xsl:if>-->
 
117
 
 
118
<xsl:choose>
 
119
<xsl:when test="string-length(infos/photo) &gt;2  or string-length(infos/photo_small) &gt;2 ">
 
120
 
 
121
            <blockTable style="product1" colWidths="6.5cm,2.5cm" >
 
122
 
 
123
                 <tr>
 
124
                     <td>
 
125
                       <para style="slogan1">
 
126
                          <xpre><b><xsl:value-of select="infos/lot_num"/> &#160;- &#160;</b>  <xsl:value-of select="infos/info"/>
 
127
                                                </xpre></para>
 
128
                                                  <spacer length="2.0mm"/>
 
129
                                           <xsl:if test="lot_est1&gt;0">
 
130
                                           <para style="slogan2">
 
131
                                           <xpre>
 
132
                                             Est. <i> <xsl:value-of select="format-number(lot_est1, '#,##0.00')"/>/&#160;<xsl:value-of select="format-number(lot_est2, '#,##0.00')"/> Euro</i></xpre></para>
 
133
                                       </xsl:if>
 
134
                                        </td>
 
135
                                                <td>
 
136
 
 
137
                                                        <xsl:if test="infos/photo_small" >
 
138
 
 
139
                                                                        <image x="0" y="0" height="2.5cm" width="2cm" >
 
140
 
 
141
                                                                        <xsl:value-of select="infos/photo_small"/>
 
142
 
 
143
                                                                        </image>
 
144
 
 
145
                                                        </xsl:if>
 
146
                                   </td>
 
147
                    </tr>
 
148
  </blockTable>
 
149
</xsl:when>
 
150
<xsl:otherwise>
 
151
                        <!-- photo on the right-->
 
152
 
 
153
       <blockTable style="product1" colWidths="9cm">
 
154
                       <tr>
 
155
                                     <td>
 
156
                                       <para style="slogan1">
 
157
                                       <xpre>
 
158
                                          <b><xsl:value-of select="infos/lot_num"/>&#160;- &#160;</b>  <xsl:value-of select="infos/info"/>
 
159
                                                                </xpre></para>
 
160
                                                                  <spacer length="2.0mm"/>
 
161
                                                           <xsl:if test="lot_est1&gt;0">
 
162
                                                           <para style="slogan2">
 
163
                                                           <xpre>
 
164
                                                            Est. <i><xsl:value-of select="format-number(lot_est1, '#,##0.00')"/>/&#160;<xsl:value-of select="format-number(lot_est2, '#,##0.00')"/> Euro
 
165
                                                           </i>
 
166
                                                           </xpre>
 
167
                                                            </para>
 
168
                                                       </xsl:if>
 
169
                                                        </td>
 
170
 
 
171
                                  </tr>
 
172
  </blockTable>
 
173
</xsl:otherwise>
 
174
</xsl:choose>
 
175
 
 
176
</xsl:template>
 
177
 
 
178
 
 
179
</xsl:stylesheet>