[MERGE]: Merge with lp:trunk-dev-addons2
[odoo/odoo.git] / addons / account / report / account_profit_horizontal.rml
1 <?xml version="1.0"?>
2 <document filename="test.pdf">
3   <template pageSize="(1120.0,770.0)" title="Profit and Loss" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20" >
4     <pageTemplate id="first">
5       <frame id="first" x1="22.0" y1="15.0" width="1080" height="680"/>
6     </pageTemplate>
7   </template>
8   <stylesheet>
9     <blockTableStyle id="Standard_Outline">
10       <blockAlignment value="LEFT"/>
11       <blockValign value="TOP"/>
12     </blockTableStyle>
13     <blockTableStyle id="Table_Heading">
14       <blockAlignment value="LEFT"/>
15       <blockValign value="TOP"/>
16     </blockTableStyle>
17     <blockTableStyle id="Table_Company_Name">
18       <blockAlignment value="LEFT"/>
19       <blockValign value="TOP"/>
20     </blockTableStyle>
21     <blockTableStyle id="Table_Date_from_To">
22       <blockAlignment value="LEFT"/>
23       <blockValign value="TOP"/>
24     </blockTableStyle>
25     <blockTableStyle id="Table_debit_credit">
26       <blockAlignment value="LEFT"/>
27       <blockValign value="TOP"/>
28     </blockTableStyle>
29     <blockTableStyle id="Table_Account_Line_Title">
30       <blockAlignment value="LEFT"/>
31       <blockValign value="TOP"/>
32       <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
33       <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,1" stop="-1,-1"/>
34     </blockTableStyle>
35     <blockTableStyle id="Table_Main_Content">
36       <blockAlignment value="LEFT"/>
37       <blockValign value="TOP"/>
38     </blockTableStyle>
39     <blockTableStyle id="Table_Expense_Content">
40       <blockAlignment value="LEFT"/>
41       <blockValign value="TOP"/>
42     </blockTableStyle>
43     <blockTableStyle id="Table_Income_Content">
44       <blockAlignment value="LEFT"/>
45       <blockValign value="TOP"/>
46     </blockTableStyle>
47      <blockTableStyle id="Table3">
48       <blockAlignment value="LEFT"/>
49       <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
50     </blockTableStyle>
51     <blockTableStyle id="Table_Net_Profit_Loss">
52       <blockAlignment value="LEFT"/>
53       <blockValign value="TOP"/>
54       <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,-1"/>
55     </blockTableStyle>
56     <blockTableStyle id="Table_Final_Result">
57       <blockAlignment value="LEFT"/>
58       <blockValign value="TOP"/>
59       <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
60       <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
61       <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
62       <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
63       <lineStyle kind="LINEAFTER" colorName="#cccccc" start="1,0" stop="1,-1"/>
64       <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
65       <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
66     </blockTableStyle>
67    <blockTableStyle id="Table2_header">
68       <blockAlignment value="LEFT"/>
69       <blockValign value="TOP"/>
70     <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
71       <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
72       <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
73       <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
74       <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
75       <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
76       <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
77       <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
78       <lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/>
79       <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
80       <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
81       <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
82       <lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/>
83       <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
84       <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
85       <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
86       <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
87       <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
88       <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
89       <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
90       <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
91       <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
92       <lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
93       <lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
94       <lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
95       <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
96       <lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
97       <lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
98     </blockTableStyle>
99
100     <initialize>
101       <paraStyle name="all" alignment="justify"/>
102     </initialize>
103     <paraStyle name="P1" rightIndent="2.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
104     <paraStyle name="P2" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
105     <paraStyle name="Standard" fontName="Times-Roman"/>
106     <paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
107     <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
108     <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
109     <paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" spaceBefore="6.0" spaceAfter="6.0"/>
110     <paraStyle name="Index" fontName="Helvetica" fontSize="9.0" leading="11"/>
111     <paraStyle name="Footer" fontName="Times-Roman"/>
112     <paraStyle name="Table Contents" fontName="Times-Roman"/>
113     <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
114     <paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
115     <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
116     <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
117     <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
118     <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
119     <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
120     <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
121     <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
122     <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
123     <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
124     <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
125     <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
126     <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
127     <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
128     <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
129     <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
130     <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
131     <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
132     <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
133     <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
134     <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
135     <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
136   </stylesheet>
137   <images/>
138   <story>
139     <para style="terp_header_Centre">
140       <font color="white"> </font>
141     </para>
142     <blockTable colWidths="539.0" style="Table_Company_Name">
143       <tr>
144         <td>
145           <para style="terp_header_Centre">Profit And Loss</para>
146         </td>
147       </tr>
148     </blockTable>
149         <para style="Standard">
150       <font color="white"> </font>
151     </para>
152                 <para style="P2">[[ get_data(data) or removeParentNode('para')]]</para>
153       <blockTable colWidths="250.0,200.0,200.0,200.0,200.0" style="Table2_header">
154       <tr>
155         <td><para style="terp_tblheader_General_Centre">Chart of Account </para></td>
156         <td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
157         <td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
158                 <td><para style="terp_tblheader_General_Centre">Display Account</para></td>
159         <td><para style="terp_tblheader_General_Centre">Target Moves</para></td>
160       </tr>
161         <tr>
162            <td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
163        <td><para style="terp_default_Centre_8">[[ get_fiscalyear(data)  or '' ]]</para></td>
164         <td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
165                 <blockTable colWidths="90.0,90.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
166                                 <tr>
167                        <td><para style="terp_tblheader_General_Centre">Start Date</para></td>
168                                 <td><para style="terp_tblheader_General_Centre">End Date</para></td>
169                         </tr>
170                         <tr>
171                                 <td><para style="terp_default_Centre_8">[[ formatLang(get_start_date(data),date=True) ]]</para></td>
172                                 <td><para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</para></td>
173                         </tr>
174                 </blockTable>
175                 <blockTable colWidths="90.0,90.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
176                                 <tr>
177                                 <td><para style="terp_tblheader_General_Centre">Start Period</para></td>
178                                 <td><para style="terp_tblheader_General_Centre">End Period</para></td>
179                         </tr>
180                         <tr>
181                                 <td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
182                                 <td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
183                         </tr>
184                  </blockTable>
185                 </td>
186                 <td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or  (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
187                 <td><para style="terp_default_Centre_8">[[ get_target_move(data) ]]</para></td>
188         </tr>
189         </blockTable>
190         <para style="Standard">
191       <font color="white"> </font>
192     </para>
193         <para style="Standard">
194       <font color="white"> </font>
195     </para>
196     <blockTable colWidths="100.0,308.16,116.32,100.0,308.16,116.32" style="Table_Account_Line_Title" repeatRows="1">
197       <tr>
198         <td>
199           <para style="terp_default_Bold_9">Code</para>
200         </td>
201         <td>
202           <para style="terp_default_Bold_9">Perticular</para>
203         </td>
204         <td>
205           <para style="terp_tblheader_Details_Right">Balance</para>
206         </td>
207         <td>
208           <para style="terp_default_Bold_9">Code</para>
209         </td>
210         <td>
211           <para style="terp_default_Bold_9">Perticular</para>
212         </td>
213         <td>
214           <para style="P1">Balance</para>
215         </td>
216       </tr>
217         <tr>
218           <td>
219             <para style="terp_default_9">
220
221               <font face="Times-Roman">[[ repeatIn(get_lines(),'a' ) ]] </font>[[ a['code'] ]]<font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'}))  or removeParentNode('font') ]]</font>
222             </para>
223           </td>
224           <td>
225             <para style="terp_default_9">
226               <font color="white">[[  '. '*(a['level']-1) ]]</font><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'}))  or removeParentNode('font') ]][[ a['name'] ]]</font>
227             </para>
228           </td>
229           <td>
230             <para style="terp_default_Right_9"><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(abs(a['balance'])) ]] [[ company.currency_id.symbol ]]</font></para>
231           </td>
232           <td>
233             <para style="terp_default_9">
234               [[ a['code1'] ]]<font>[[ a['level1']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font>
235             </para>
236           </td>
237           <td>
238             <para style="terp_default_9">
239               <font color="white">[[  '. '*(a['level1']-1) ]]</font><font>[[ a['level1']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name1'] ]]</font>
240             </para>
241           </td>
242           <td>
243             <para style="terp_default_Right_9"><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[(a['code1'] and a['name1']) and  formatLang(abs(a['balance1'])) or removeParentNode('font') ]] [[ company.currency_id.symbol ]]</font></para>
244           </td>
245         </tr>
246       </blockTable>
247     <blockTable colWidths="100.0,308.16,116.32,100.0,308.16,116.32" style="Table_Net_Profit_Loss">
248       <tr>
249         <td>
250           <para style="terp_default_Bold_9"></para>
251         </td>
252         <td>
253           <para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Profit C.F.B.L.' and final_result()['type'] or '' ]]</para>
254         </td>
255         <td>
256           <para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and  formatLang(abs(final_result()['balance'])) ]] [[ company.currency_id.symbol ]]</para>
257         </td>
258         <td>
259           <para style="terp_default_Bold_9"></para>
260         </td>
261         <td>
262           <para style="terp_default_Bold_9">[[ final_result()['type'] == 'Net Loss C.F.B.L.' and final_result()['type'] or '' ]]</para>
263         </td>
264         <td>
265           <para style="terp_default_Right_9_Bold">[[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and  formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and company.currency_id.symbol ]]</para>
266         </td>
267       </tr>
268     </blockTable>
269
270     <blockTable colWidths="408.16,116.32,408.16,116.32" style="Table_Net_Profit_Loss">
271       <tr>
272         <td>
273           <para style="terp_default_Bold_9">Total:</para>
274         </td>
275         <td>
276           <para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_dr())) ]] [[ company.currency_id.symbol ]]</u></para>
277         </td>
278         <td>
279           <para style="terp_default_Bold_9">Total:</para>
280         </td>
281         <td>
282           <para style="terp_default_Right_9_Bold"><u>[[ formatLang(abs(sum_cr())) ]] [[ company.currency_id.symbol ]]</u></para>
283         </td>
284       </tr>
285     </blockTable>
286     <para style="terp_default_8">
287       <font color="white"> </font>
288     </para>
289   </story>
290 </document>
291