[IMP] openerp python module.
[odoo/odoo.git] / openerp / addons / base / report / corporate_defaults.xsl
1 <?xml version = '1.0' encoding="utf-8"?>
2
3 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
4         <xsl:variable name="signature" select="//corporate-header/user/signature"/>
5         <xsl:variable name="title">Open ERP Report</xsl:variable>
6         <xsl:variable name="leftMargin">1cm</xsl:variable>
7         <xsl:variable name="rightMargin">1cm</xsl:variable>
8         <xsl:variable name="topMargin">1cm</xsl:variable>
9         <xsl:variable name="bottomMargin">1cm</xsl:variable>
10         <xsl:variable name="pageSize">21cm,29.7cm</xsl:variable>
11
12         <xsl:variable name="page_format">a4_letter</xsl:variable>
13
14         <xsl:template name="first_page_graphics_corporation">
15                 <!--logo-->
16                 <setFont name="Helvetica" size="14"/>
17                 <fill color="black"/>
18                 <stroke color="black"/>
19                 <drawString x="1cm" y="27.6cm"><xsl:value-of select="//corporate-header/corporation/name"/></drawString>
20                 <lines>1cm 28.4cm 20cm 28.4cm</lines>
21                 <lines>1cm 25.4cm 7cm 25.4cm</lines>
22
23                 <setFont name="Helvetica" size="10"/>
24                 <drawRightString x="20cm" y="28.5cm"><xsl:value-of select="//corporate-header/corporation/rml_header1"/></drawRightString>
25                 <drawString x="1cm" y="27cm"><xsl:value-of select="//corporate-header/corporation/address/street"/></drawString>
26                 <drawString x="1cm" y="26.5cm">
27                         <xsl:value-of select="//corporate-header/corporation/address/zip"/>
28                         <xsl:text> </xsl:text>
29                         <xsl:value-of select="//corporate-header/corporation/address/city"/>
30                         <xsl:text> - </xsl:text>
31                         <xsl:value-of select="//corporate-header/corporation/address/country"/>
32                 </drawString>
33                 <drawString x="1cm" y="26cm">Phone:</drawString>
34                 <drawRightString x="7cm" y="26cm"><xsl:value-of select="//corporate-header/corporation/address/phone"/></drawRightString>
35                 <drawString x="1cm" y="25.5cm">Mail:</drawString>
36                 <drawRightString x="7cm" y="25.5cm"><xsl:value-of select="//corporate-header/corporation/address/email"/></drawRightString>
37
38
39                 <!--page bottom-->
40
41                 <lines>1.5cm 2.2cm 19.9cm 2.2cm</lines>
42                 <drawCentredString x="10.5cm" y="1.7cm"><xsl:value-of select="//corporate-header/corporation/rml_footer1"/></drawCentredString>
43                 <drawCentredString x="10.5cm" y="1.25cm"><xsl:value-of select="//corporate-header/corporation/rml_footer2"/></drawCentredString>
44                 <drawCentredString x="10.5cm" y="0.8cm">Your contact : <xsl:value-of select="//corporate-header/user/name"/></drawCentredString>
45
46         </xsl:template>
47
48
49         <xsl:template name="other_pages_graphics_corporation">
50                 <!--logo-->
51                 <setFont name="Helvetica" size="14"/>
52                 <fill color="black"/>
53                 <stroke color="black"/>
54                 <drawString x="1cm" y="27.6cm"><xsl:value-of select="//corporate-header/corporation/name"/></drawString>
55                 <lines>1cm 25.4cm 20cm 25.4cm</lines>
56 <!--            <lines>1cm 25.7cm 7cm 25.7cm</lines>-->
57
58                 <setFont name="Helvetica" size="10"/>
59                 <drawRightString x="1cm" y="27.5cm"><xsl:value-of select="//corporate-header/corporation/rml_header1"/></drawRightString>
60                 <drawString x="1cm" y="27cm"><xsl:value-of select="//corporate-header/corporation/address/street"/></drawString>
61                 <drawString x="1cm" y="26.5cm">
62                         <xsl:value-of select="//corporate-header/corporation/address/zip"/>
63                         <xsl:text> </xsl:text>
64                         <xsl:value-of select="//corporate-header/corporation/address/city"/>
65                         <xsl:text> - </xsl:text>
66                         <xsl:value-of select="//corporate-header/corporation/address/country"/>
67                 </drawString>
68                 <drawString x="1cm" y="26cm">Phone:</drawString>
69                 <drawRightString x="7cm" y="26cm"><xsl:value-of select="//corporate-header/corporation/address/phone"/></drawRightString>
70                 <drawString x="1cm" y="25.5cm">Mail:</drawString>
71                 <drawRightString x="7cm" y="25.5cm"><xsl:value-of select="//corporate-header/corporation/address/email"/></drawRightString>
72
73                 <!--page bottom-->
74
75                 <lines>1.5cm 1.2cm 19.9cm 1.2cm</lines>
76                 <drawCentredString x="10.5cm" y="1.7cm"><xsl:value-of select="//corporate-header/corporation/rml_footer1"/></drawCentredString>
77                 <drawCentredString x="10.5cm" y="1.25cm"><xsl:value-of select="//corporate-header/corporation/rml_footer2"/></drawCentredString>
78 <!--            <drawCentredString x="10.5cm" y="0.8cm">Your contact : <xsl:value-of select="//corporate-header/user/name"/></drawCentredString>-->
79         </xsl:template>
80
81         <xsl:template name="first_page_frames">
82                 <xsl:if test="$page_format='a4_normal'">
83                         <frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="22.0cm"/>
84                 </xsl:if>
85
86                 <xsl:if test="$page_format='a4_letter'">
87                         <frame id="address" x1="11cm" y1="21.5cm" width="6cm" height="4cm"/>
88                         <frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="17.5cm"/>
89                 </xsl:if>
90         </xsl:template>
91
92         <xsl:template name="other_pages_frames">
93                 <frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="22cm"/>
94         </xsl:template>
95
96 </xsl:stylesheet>