<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="34.0" y1="42.0" width="527" height="758"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau2">
	<blockAlignment value="LEFT" start="0,0" stop="0,-1"/>
	<blockAlignment value="CENTER" start="1,0" stop="-1,0"/>
	<blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/>
	<blockValign value="TOP"/>
	<lineStyle kind="LINEBELOW" colorName="#3b3131" start="0,0" stop="-1,0" />
	<lineStyle kind="LINEBELOW" colorName="#e0e0e0"  start="0,1" stop="-1,-2" />
</blockTableStyle>
<blockTableStyle id="Tableau3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#e6e6e6"/>
</blockTableStyle>
<blockTableStyle id="Tableau5">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau6">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#736F6E" start="1,0" stop="-1,0" />
<lineStyle kind="LINEABOVE" colorName="#3b3131" start="1,2" stop="-1,2" />
</blockTableStyle>
<blockTableStyle id="Tableau4">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>

<blockTableStyle id="Tableau7">
	<blockAlignment value="LEFT"/>
	<blockValign value="TOP"/>
	<lineStyle kind="LINEABOVE" colorName="#e0e0e0" Thickness="1"/>
	<lineStyle kind="LINEBELOW" colorName="#e0e0e0" />
	<lineStyle kind="LINEAFTER" colorName="#e0e0e0" />
	<lineStyle kind="LINEBEFORE" colorName="#e0e0e0" />
	<blockBackground colorName="white" start="0,0" stop="-1,0"/>
</blockTableStyle>

<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P3" fontName="Helvetica" alignment="LEFT"/>
<paraStyle name="P29" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT"/>
<paraStyle name="P32" fontName= "Helvetica" fontSize="8.0" leading="13" alignment="RIGHT"/>
<paraStyle name="P32c" fontName= "Helvetica" fontSize="8.0" leading="13" alignment="CENTER"/>
<paraStyle name="P10" fontName="Helvetica" fontSize="6.0" leading="11" alignment="LEFT" leftIndent="10"/>
<paraStyle name="P14" fontName="Helvetica" fontSize="10.0" leading="13" />
<paraStyle name="P25" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT"/>
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="9.0" leading="11"/>
<paraStyle name="P20" fontName="Helvetica-Bold" fontSize="14.5" leading="20" alignment="LEFT" leftIndent="-3"/>
<paraStyle name="P25b" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT"/>
<paraStyle name="P27" fontName="Helvetica-Bold" fontSize="9.0" leading="14" alignment="RIGHT"/>
<paraStyle name="P27e" fontName="Helvetica-Bold" fontSize="9.0" leading="14" alignment="LEFT"/>
<paraStyle name="P27b" fontName="Helvetica-Bold" fontSize="8.0" leading="14" alignment="CENTER"/>
</stylesheet>
<images/>
<story>
<para style="P25">[[ repeatIn(objects,'o') ]] <font face="Helvetica">[[ setLang(o.partner_id.lang) ]]</font>
</para>
<blockTable colWidths="275.0,50.0,220.0" style="Tableau1">
<tr>
<td>
<para style="P5">Shipping address :</para>
<para style="P14">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
<para style="P14">[[ o.partner_shipping_id.title or '' ]] [[ o.partner_shipping_id.name ]]</para>
<para style="P14">[[ o.partner_shipping_id.street ]]</para>
<para style="P14">[[ o.partner_shipping_id.street2 or '' ]]</para>
<para style="P14">[[ o.partner_shipping_id.zip or '' ]] [[ o.partner_shipping_id.city or '' ]] [[ o.partner_shipping_id.country_id and (', %s' % (o.partner_shipping_id.country_id and o.partner_shipping_id.country_id.name or '')) ]]</para>

<para style="P25">
<font color="white"> </font>
</para>
<para style="P5">Invoice address :</para>
<para style="P14">[[ o.partner_invoice_id.street ]][[ o.partner_invoice_id.street2 and (', %s' % o.partner_invoice_id.street2 or '') ]]</para>
<para style="P14">[[ o.partner_invoice_id.zip or '' ]] [[ o.partner_invoice_id.city or '' ]] [[ o.partner_invoice_id.country_id and (', %s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '')) ]]</para>
</td>
<td>
<para style="P25">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P14">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
<para style="P14">[[ o.partner_order_id.title or '' ]] [[ o.partner_order_id.name ]]</para>
<para style="P14">[[ o.partner_order_id.street ]]</para>
<para style="P14">[[ o.partner_order_id.street2 or '' ]]</para>
<para style="P14">[[ o.partner_order_id.zip or '' ]] [[ o.partner_order_id.city or '' ]]</para>
<para style="P14">[[ o.partner_order_id.state_id and o.partner_order_id.state_id.name or '' ]]</para>
<para style="P14">[[ o.partner_order_id.country_id and o.partner_order_id.country_id.name or '' ]]</para>
<para style="P25">
<font color="white"> </font>
</para>
<para style="P14">Tel.&#xA0;: [[ o.partner_order_id.phone or removeParentNode('para') ]]</para>
<para style="P14">Fax&#xA0;: [[ o.partner_order_id.fax or removeParentNode('para') ]]</para>
<para style="P14">VAT&#xA0;: [[ o.partner_id.vat or removeParentNode('para') ]]</para>
</td>
</tr>
</blockTable>
<para style="P25">
<font color="white"> </font>
</para>
<para style="P20">[[ o.state&lt;&gt;'draft' and removeParentNode('para') ]] Quotation N&#xB0; : [[ o.name ]]</para>
<para style="P20">[[ o.state=='draft' and removeParentNode('para') ]] Order N&#xB0; : [[ o.name ]]</para>
<para style="P20">
<font color="white"> </font>
</para>
<blockTable colWidths="132.0,133.0,133.0,133.0" style="Tableau7">
<tr>
<td>
<para style="P27b">Your Reference </para>
</td>
<td>
<para style="P27b">Date Ordered </para>
</td>
<td>
<para style="P27b">Our Salesman </para>
</td>
<td>
<para style="P27b">Payment Terms</para>
</td>
</tr>
<tr>
<td>
<para style="P32c">[[ o.client_order_ref ]]</para>
</td>
<td>
<para style="P32c">[[ o.date_order ]]</para>
</td>
<td>
<para style="P32c">[[ o.user_id.name ]]</para>
</td>
<td>
<para style="P32c">[[ o.partner_id.property_payment_term and o.partner_id.property_payment_term.note or False ]] </para>
</td>
</tr>
</blockTable>
<para style="P29">
<font color="white"> </font>
</para>

<blockTable colWidths="213,54.0,53.0,69.0,65.0,75.0" repeatRows="1" style="Tableau2">
<tr>
<td>
<para style="P27e">Description</para>
</td>
<td>
<para style="P27">VAT</para>
</td>
<td>
<para style="P27">Quantity</para>
</td>
<td>
<para style="P27">Unit Price</para>
</td>
<td>
<para style="P27">Disc. (%)</para>
</td>
<td>
<para style="P27">Price</para>
</td>
</tr>
<tr>
	<td>
	<para style="P10">[[ repeatIn(o.order_line,'line') ]]</para>
	<para style="P29">[[ line.name ]]</para>
		<para style="P10">[[ repeatIn((line.notes and line.notes.split('\n')) or [], 'l', 'para') ]]<i>[[ l ]]</i></para>
	</td>
	<td>
	<para style="P32">[[ ', '.join(map(lambda x: x.name, line.tax_id))]]</para>
	</td>
	<td>
	<para style="P32">[[ line.product_uos and line.product_uos_qty or line.product_uom_qty ]] [[ line.product_uos and line.product_uos.name or line.product_uom.name ]]</para>
	</td>
	<td>
	<para style="P32">[[ line.price_unit ]]</para>
	</td>
	<td>
	<para style="P32">[[ (line.discount and str(line.discount))or '' ]]</para>
	</td>
	<td>
	<para style="P32">[[ line.price_subtotal ]]</para>
	</td>
</tr>
</blockTable>


<condPageBreak height="2.5cm"/>

<blockTable colWidths="330.0,69.0,128.7" style="Tableau6">
<tr>
<td>
<para style="P25">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P25">Net Total&#xA0;:</para>
</td>
<td>
<para style="P25">[[ o.amount_untaxed ]] [[ o.pricelist_id.currency_id.name ]]

</para>
</td>
</tr>
<tr>
<td>
<para style="P25">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P25">Total VAT:</para>
</td>
<td>
<para style="P25">[[ o.amount_tax or '0.00' ]] [[ o.pricelist_id.currency_id.name ]]</para>
</td>
</tr>
<tr>
<td>
<para style="P25">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P25b">Total :</para>
</td>
<td>
<para style="P25b">[[ o.amount_total ]] [[ o.pricelist_id.currency_id.name ]]</para>
</td>
</tr>
</blockTable>
<para style="P25">
<font color="white"> </font>
</para>
<blockTable colWidths="527.0" style="Tableau4">
<tr>
<td>
<para style="P3">[[ format(o.note or '') ]]</para>
</td>
</tr>
<tr>
<td>
<para style="P3">[[ format((o.partner_id.property_payment_term and o.partner_id.property_payment_term.note) or '') ]]</para>
</td>
</tr>
</blockTable>
<pageNumberReset/>
</story>
</document>

