2 <document filename="Invoices.pdf">
3 <template title="Invoices" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
4 <pageTemplate id="first">
5 <frame id="first" x1="34.0" y1="28.0" width="530" height="786"/>
9 <blockTableStyle id="Standard_Outline">
10 <blockAlignment value="LEFT"/>
11 <blockValign value="TOP"/>
13 <blockTableStyle id="Table_Partner_Address">
14 <blockAlignment value="LEFT"/>
15 <blockValign value="TOP"/>
17 <blockTableStyle id="Table_Invoice_General_Header">
18 <blockAlignment value="LEFT"/>
19 <blockValign value="TOP"/>
20 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
21 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
22 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
23 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
24 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
25 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
26 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
27 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
28 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
29 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
30 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
31 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
32 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
33 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
35 <blockTableStyle id="Table_General_Detail_Content">
36 <blockAlignment value="LEFT"/>
37 <blockValign value="TOP"/>
38 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
39 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
40 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
41 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
42 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
43 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
44 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
45 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
46 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
47 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
48 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
49 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
50 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
51 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
53 <blockTableStyle id="Table7">
54 <blockAlignment value="LEFT"/>
55 <blockValign value="TOP"/>
56 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
57 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
58 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
59 <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
60 <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
61 <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
63 <blockTableStyle id="Table8">
64 <blockAlignment value="LEFT"/>
65 <blockValign value="TOP"/>
66 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
67 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
68 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
69 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
70 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
71 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
73 <blockTableStyle id="Table10">
74 <blockAlignment value="LEFT"/>
75 <blockValign value="TOP"/>
76 <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
77 <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
78 <lineStyle kind="LINEABOVE" colorName="#000000" start="1,2" stop="1,2"/>
79 <lineStyle kind="LINEABOVE" colorName="#000000" start="2,2" stop="2,2"/>
81 <blockTableStyle id="Table9">
82 <blockAlignment value="LEFT"/>
83 <blockValign value="TOP"/>
84 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
85 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
86 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
88 <blockTableStyle id="Table2">
89 <blockAlignment value="LEFT"/>
90 <blockValign value="TOP"/>
91 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
92 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
93 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
95 <blockTableStyle id="Table1">
96 <blockAlignment value="LEFT"/>
97 <blockValign value="TOP"/>
100 <paraStyle name="all" alignment="justify"/>
102 <paraStyle name="Standard"/>
103 <paraStyle name="Text body" spaceBefore="0.0" spaceAfter="6.0"/>
104 <paraStyle name="List" spaceBefore="0.0" spaceAfter="6.0"/>
105 <paraStyle name="Table Contents" spaceBefore="0.0" spaceAfter="6.0"/>
106 <paraStyle name="Caption" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
107 <paraStyle name="Index"/>
109 <paraStyle name="terp_header" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
110 <paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
111 <paraStyle name="Footer"/>
112 <paraStyle name="Horizontal Line" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
114 <paraStyle name="terp_tblheader_General" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
115 <paraStyle name="terp_tblheader_Details" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
116 <paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
117 <paraStyle name="terp_tblheader_General_Right" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
118 <paraStyle name="terp_tblheader_Details_Centre" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
119 <paraStyle name="terp_tblheader_Details_Right" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
121 <paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
122 <paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
123 <paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
124 <paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
125 <paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="-3.0" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
126 <paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
127 <paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
128 <paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="-3.0" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
129 <paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
130 <paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
132 <paraStyle name="Table" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
133 <paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0"/>
134 <paraStyle name="Preformatted Text" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
139 <para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
140 <para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>
141 <pto_header><!-- Must be after setLang() -->
142 <blockTable colWidths="202.0,87.0,71.0,57.0,42.0,71.0" style="Table7">
144 <td><para style="terp_tblheader_Details"><b>Description</b></para></td>
145 <td><para style="terp_tblheader_Details_Centre"><b>Taxes</b></para></td>
146 <td><para style="terp_tblheader_Details_Centre"><b>Quantity</b></para></td>
147 <td><para style="terp_tblheader_Details_Right"><b>Unit Price</b></para></td>
148 <td><para style="terp_tblheader_Details_Right"><b>Disc.(%)</b></para></td>
149 <td><para style="terp_tblheader_Details_Right"><b>Price</b></para></td>
153 <blockTable colWidths="297.0,233.0" style="Table_Partner_Address">
156 <para style="terp_default_8">
157 <font color="white"> </font>
161 <para style="terp_default_8">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]</para>
162 <para style="terp_default_8">[[ display_address(o.partner_id) ]]</para>
163 <para style="terp_default_8">
164 <font color="white"> </font>
166 <para style="terp_default_8">Tel. : [[ (o.partner_id.phone) or removeParentNode('para') ]]</para>
167 <para style="terp_default_8">Fax : [[ (o.partner_id.fax) or removeParentNode('para') ]]</para>
168 <para style="terp_default_8">TIN : [[ (o.partner_id.vat) or removeParentNode('para') ]]</para>
172 <para style="terp_header"><b>Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
173 <para style="terp_header"><b>PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</b></para>
174 <para style="terp_header"><b>Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</b></para>
175 <para style="terp_header"><b>Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
176 <para style="terp_header"><b>Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
177 <para style="terp_header"><b>Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
178 <para style="terp_header"><b>Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
179 <para style="terp_default_8">
180 <font color="white"> </font>
182 <blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_Invoice_General_Header">
185 <para style="terp_tblheader_General_Centre"><b>Description</b></para>
188 <para style="terp_tblheader_General_Centre"><b>Invoice Date</b></para>
191 <para style="terp_tblheader_General_Centre"><b>Source</b></para>
194 <para style="terp_tblheader_General_Centre"><b>Customer Code</b></para>
198 <blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_General_Detail_Content">
201 <para style="terp_default_Centre_9">[[ o.name or ' ' ]]</para>
204 <para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para>
207 <para style="terp_default_Centre_9">[[ o.origin or '' ]]</para>
210 <para style="terp_default_Centre_9">[[ (o.partner_id.ref) or ' ' ]]</para>
214 <para style="terp_default_8">
215 <font color="white"> </font>
217 <blockTable colWidths="185.0,70.0,80.0,60.0,50.0,85.0" style="Table7">
220 <para style="terp_tblheader_General"><b>Description</b></para>
223 <para style="terp_tblheader_General_Centre"><b>Taxes</b></para>
226 <para style="terp_tblheader_General_Right"><b>Quantity</b></para>
229 <para style="terp_tblheader_General_Right"><b>Unit Price</b></para>
232 <para style="terp_tblheader_General_Right"><b>Disc.(%)</b></para>
235 <para style="terp_tblheader_General_Right"><b>Price</b></para>
240 <para style="terp_default_2">[[ repeatIn(o.invoice_line,'l') ]]</para>
241 <blockTable colWidths="185.0,70.0,80.0,60.0,50.0,85.0" style="Table8">
244 <para style="terp_default_9">[[ format(l.name) ]]</para>
247 <para style="terp_default_Centre_9">[[ ', '.join([ lt.name or '' for lt in l.invoice_line_tax_id ]) ]]</para>
250 <para style="terp_default_Right_9">[[ formatLang(l.quantity)]] [[ (l.uos_id and l.uos_id.name) or '' ]]</para>
253 <para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]]</para>
256 <para style="terp_default_Centre_9">[[ formatLang(l.discount, dp='Account') ]] </para>
259 <para style="terp_default_Right_9">[[ formatLang(l.price_subtotal, dp='Account', currency_obj=o.currency_id) ]]</para>
264 <blockTable colWidths="385.0,60.0,85.0" style="Table10">
267 <para style="terp_default_8">
268 <font color="white"> </font>
272 <para style="terp_default_9">Net Total:</para>
275 <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
280 <para style="terp_default_8">
281 <font color="white"> </font>
285 <para style="terp_default_9">Taxes:</para>
288 <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Account', currency_obj=o.currency_id) ]]</para>
293 <para style="terp_default_8">
294 <font color="white"> </font>
298 <para style="terp_default_9"><b>Total:</b></para>
301 <para style="terp_default_Bold_Right_9"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</b></para>
305 <para style="Text body">
306 <font color="white"> </font>
308 <blockTable colWidths="205.0,71.0,71.0,183.0" style="Table9">
311 <para style="terp_tblheader_Details"><b>Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]]</b></para>
314 <para style="terp_tblheader_Details_Right"><b>Base </b></para>
317 <para style="terp_tblheader_Details_Right"><b>Amount </b></para>
320 <para style="terp_default_8">
321 <font color="white"> </font>
327 <para style="terp_default_2">[[ repeatIn(o.tax_line,'t') ]]</para>
328 <blockTable colWidths="205.0,71.0,71.0,184.0" style="Table2">
331 <para style="terp_default_8">[[ t.name ]]</para>
334 <para style="terp_default_Right_8">[[ formatLang(t.base, dp='Account', currency_obj=o.currency_id) ]]</para>
337 <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
340 <para style="terp_default_8">
341 <font color="white"> </font>
347 <para style="terp_default_9">
348 <font color="white"> </font>
350 <para style="terp_default_9">[[ (o.comment and format(o.comment )) or removeParentNode('para') ]]</para>
351 <para style="terp_default_8">
352 <font color="white"> </font>
354 <para style="terp_default_9">[[ (o.payment_term and o.payment_term.note and format(o.payment_term and o.payment_term.note)) or removeParentNode('para') ]]</para>
355 <para style="terp_default_9">
356 <font color="white"> </font>
358 <blockTable colWidths="120.0,410.0" style="Table1">
361 <para style="terp_default_Bold_9"><b>Fiscal Position Remark : </b></para>
364 <para style="terp_default_9">[[ (o.fiscal_position and o.fiscal_position.note and format(o.fiscal_position.note)) or removeParentNode('blockTable') ]]</para>
368 <para style="terp_default_2">
369 <font color="white"> </font>