[fix] problem in o2m
[odoo/odoo.git] / addons / auction / report / ach_bordereau_photo.xsl
1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet version="1.0"
3     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4     xmlns:fo="http://www.w3.org/1999/XSL/Format"/>
5    
6     <xsl:import href="corporate_defaults.xsl" />
7     <xsl:template match="/">
8         <xsl:call-template name="rml" />
9     </xsl:template>
10
11     <xsl:template name="rml" match="/">
12         <document filename="example.pdf">
13             <template>
14                 <pageTemplate id="first">
15                     <frame id="first" x1="1cm" y1="2.5cm" width="19.0cm" height="23.0cm"/>
16                     <pageGraphics>
17                         <xsl:apply-imports />
18                     </pageGraphics>
19                 </pageTemplate>
20             </template>
21             <stylesheet>
22                 <paraStyle name="normal" fontName="Times-Roman" fontSize="12"  />
23                 <paraStyle name="title" fontName="Times-Bold" fontSize="15" alignment="center" />
24                 <paraStyle name="table_title" fontName="Times-Bold" fontSize="12" alignment="center" />
25                 <paraStyle name="product1" fontName="Times-Roman" fontSize="8" />
26                 <paraStyle name="categ" fontName="Times-Bold" fontSize="10"  textColor="blue"/>
27                 <paraStyle name="price" fontName="Times-Roman" fontSize="8" alignment="right" />
28
29                 <blockTableStyle id="main_title">
30                     <blockAlignment value="CENTER" />
31                     <lineStyle kind="GRID" colorName="black"/>
32                     <blockBackground colorName="#e6e6e6" />
33                     <blockValign value="TOP"/>
34                 </blockTableStyle>
35
36                 <blockTableStyle id="product">
37                     <blockAlignment value="LEFT" />
38                     <xsl:for-each select="/report/title">
39                         <xsl:variable name="col" select="attribute::number" />
40                         <blockBackground>
41                             <xsl:attribute name="colorName">#e6e6e6</xsl:attribute>
42                             <xsl:attribute name="start">
43                                 <xsl:value-of select="$col" />
44                                 <xsl:text>,0</xsl:text>
45                             </xsl:attribute>
46                             <xsl:attribute name="stop">
47                                 <xsl:value-of select="$col" />
48                                 <xsl:text>,0</xsl:text>
49                             </xsl:attribute>
50                         </blockBackground>
51                     </xsl:for-each>
52                     <lineStyle kind="LINEABOVE" colorName="black" start="0,0" stop="-1,-1" />
53                     <lineStyle kind="LINEBEFORE" colorName="black" start="0,0" stop="-1,-1"/>
54                     <lineStyle kind="LINEAFTER" colorName="black" start="-1,0" stop="-1,-1"/>
55                     <lineStyle kind="LINEBELOW" colorName="black" start="0,-1" stop="-1,-1"/>
56                     <blockValign value="TOP"/>
57                 </blockTableStyle>
58             </stylesheet >
59             <story>
60                 <xsl:call-template name="story"/>
61             </story>
62         </document>
63     </xsl:template>
64 </xsl:stylesheet>