[MODULE] +v1.1.0 from https://www.odoo.com/apps/7.0/account_financial_report_webkit/
[burette/account_financial_report_webkit.git] / report / templates / aged_trial_webkit.mako
1 ## -*- coding: utf-8 -*-
2 <!DOCTYPE html SYSTEM
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <style type="text/css">
7 .overflow_ellipsis {
8 text-overflow: ellipsis;
9 overflow: hidden;
10 white-space: nowrap;
11 }
12
13 .open_invoice_previous_line {
14 font-style: italic;
15 }
16
17 .percent_line {
18 font-style: italic;
19 }
20
21 .amount {
22 text-align:right;
23 }
24
25 .classif_title {
26 text-align:right;
27 }
28
29 .classif{
30 width: ${700/len(ranges)}px;
31 }
32 .total{
33 font-weight:bold;
34 }
35 ${css}
36 </style>
37 </head>
38
39 <%!
40 def amount(text):
41 # replace by a non-breaking hyphen (it will not word-wrap between hyphen and numbers)
42 return text.replace('-', '&#8209;')
43 %>
44 <body>
45 <%setLang(user.lang)%>
46
47 <div class="act_as_table data_table">
48 <div class="act_as_row labels">
49 <div class="act_as_cell">${_('Chart of Account')}</div>
50 <div class="act_as_cell">${_('Fiscal Year')}</div>
51 <div class="act_as_cell">
52 %if filter_form(data) == 'filter_date':
53 ${_('Dates Filter')}
54 %else:
55 ${_('Periods Filter')}
56 %endif
57 </div>
58 <div class="act_as_cell">${_('Clearance Date')}</div>
59 <div class="act_as_cell">${_('Accounts Filter')}</div>
60 <div class="act_as_cell">${_('Target Moves')}</div>
61
62 </div>
63 <div class="act_as_row">
64 <div class="act_as_cell">${ chart_account.name }</div>
65 <div class="act_as_cell">${ fiscalyear.name if fiscalyear else '-' }</div>
66 <div class="act_as_cell">
67 ${_('From:')}
68 %if filter_form(data) == 'filter_date':
69 ${formatLang(start_date, date=True) if start_date else u'' }
70 %else:
71 ${start_period.name if start_period else u''}
72 %endif
73 ${_('To:')}
74 %if filter_form(data) == 'filter_date':
75 ${ formatLang(stop_date, date=True) if stop_date else u'' }
76 %else:
77 ${stop_period.name if stop_period else u'' }
78 %endif
79 </div>
80 <div class="act_as_cell">${ formatLang(date_until, date=True) }</div>
81 <div class="act_as_cell">
82 %if partner_ids:
83 ${_('Custom Filter')}
84 %else:
85 ${ display_partner_account(data) }
86 %endif
87 </div>
88 <div class="act_as_cell">${ display_target_move(data) }</div>
89 </div>
90 </div>
91 %for acc in objects:
92 %if acc.aged_lines:
93 <div class="account_title bg" style="width: 1080px; margin-top: 20px; font-size: 12px;">${acc.code} - ${acc.name}</div>
94
95
96
97 <div class="act_as_table list_table" style="margin-top: 5px;">
98 <div class="act_as_thead">
99 <div class="act_as_row labels">
100 ## partner
101 <div class="act_as_cell first_column" style="width: 60px;">${_('Partner')}</div>
102 ## code
103 <div class="act_as_cell" style="width: 70px;">${_('code')}</div>
104 ## balance
105 <div class="act_as_cell classif_title" style="width: 70px;">${_('balance')}</div>
106 ## Classifications
107 %for title in ranges_titles:
108 <div class="act_as_cell classif classif_title">${title}</div>
109 %endfor
110 </div>
111 </div>
112 <div class="act_as_tbody">
113 %for partner_name, p_id, p_ref, p_name in acc.partners_order:
114 %if acc.aged_lines.get(p_id):
115 <div class="act_as_row lines">
116 <%line = acc.aged_lines[p_id]%>
117 <%percents = acc.aged_percents%>
118 <%totals = acc.aged_totals%>
119 <div class="act_as_cell first_column">${partner_name}</div>
120 <div class="act_as_cell">${p_ref or ''}</div>
121
122 <div class="act_as_cell amount">${formatLang(line.get('balance') or 0.0) | amount}</div>
123 %for classif in ranges:
124 <div class="act_as_cell classif amount">
125 ${formatLang(line['aged_lines'][classif] or 0.0) | amount}
126 </div>
127 %endfor
128 </div>
129 %endif
130 %endfor
131 <div class="act_as_row labels">
132 <div class="act_as_cell total">${_('Total')}</div>
133 <div class="act_as_cell"></div>
134 <div class="act_as_cell amount classif total">${formatLang(totals['balance']) | amount}</div>
135 %for classif in ranges:
136 <div class="act_as_cell amount classif total">${formatLang(totals[classif]) | amount}</div>
137 %endfor
138 </div>
139
140 <div class="act_as_row">
141 <div class="act_as_cell"><b>${_('Percents')}</b></div>
142 <div class="act_as_cell"></div>
143 <div class="act_as_cell"></div>
144 %for classif in ranges:
145 <div class="act_as_cell amount percent_line classif">${formatLang(percents[classif]) | amount}%</div>
146 %endfor
147 </div>
148 </div>
149 <br/>
150
151 %endif
152 %endfor
153 </div>
154 </body>
155 </html>