[MODULE] +v1.1.0 from https://www.odoo.com/apps/7.0/account_financial_report_webkit/
[burette/account_financial_report_webkit.git] / report / templates / account_report_print_journal.mako
1 ## -*- coding: utf-8 -*-
2 <!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <style type="text/css">
6 .overflow_ellipsis {
7 text-overflow: ellipsis;
8 overflow: hidden;
9 white-space: nowrap;
10 }
11 ${css}
12 </style>
13 </head>
14 <body>
15 <%!
16 def amount(text):
17 return text.replace('-', '&#8209;') # replace by a non-breaking hyphen (it will not word-wrap between hyphen and numbers)
18 %>
19
20 <%setLang(user.lang)%>
21
22 <div class="act_as_table data_table">
23 <div class="act_as_row labels">
24 <div class="act_as_cell">${_('Chart of Account')}</div>
25 <div class="act_as_cell">${_('Fiscal Year')}</div>
26 <div class="act_as_cell">
27 %if filter_form(data) == 'filter_date':
28 ${_('Dates Filter')}
29 %else:
30 ${_('Periods Filter')}
31 %endif
32 </div>
33 <div class="act_as_cell">${_('Journal Filter')}</div>
34 <div class="act_as_cell">${_('Target Moves')}</div>
35 </div>
36 <div class="act_as_row">
37 <div class="act_as_cell">${ chart_account.name }</div>
38 <div class="act_as_cell">${ fiscalyear.name if fiscalyear else '-' }</div>
39 <div class="act_as_cell">
40 ${_('From:')}
41 %if filter_form(data) == 'filter_date':
42 ${formatLang(start_date, date=True) if start_date else u'' }
43 %else:
44 ${start_period.name if start_period else u''}
45 %endif
46 ${_('To:')}
47 %if filter_form(data) == 'filter_date':
48 ${ formatLang(stop_date, date=True) if stop_date else u'' }
49 %else:
50 ${stop_period.name if stop_period else u'' }
51 %endif
52 </div>
53 <div class="act_as_cell">
54 %if journals(data):
55 ${', '.join([journal.name for journal in journals(data)])}
56 %else:
57 ${_('All')}
58 %endif
59
60 </div>
61 <div class="act_as_cell">${ display_target_move(data) }</div>
62 </div>
63 </div>
64
65 %for journal_period in objects:
66 <%
67 account_total_debit = 0.0
68 account_total_credit = 0.0
69 account_total_currency = 0.0
70 %>
71
72 <div class="account_title bg" style="width: 1080px; margin-top: 20px; font-size: 12px;">${journal_period.journal_id.name} - ${journal_period.period_id.name}</div>
73
74 <!-- we use div with css instead of table for tabular data because div do not cut rows at half at page breaks -->
75 <div class="act_as_table list_table" style="margin-top: 5px;">
76 <div class="act_as_thead">
77 <div class="act_as_row labels">
78 ## date
79 <div class="act_as_cell first_column">${_('Date')}</div>
80 ## move
81 <div class="act_as_cell">${_('Entry')}</div>
82 ## account code
83 <div class="act_as_cell">${_('Account')}</div>
84 ## date
85 <div class="act_as_cell">${_('Due Date')}</div>
86 ## partner
87 <div class="act_as_cell" style="width: 280px;">${_('Partner')}</div>
88 ## label
89 <div class="act_as_cell" style="width: 310px;">${_('Label')}</div>
90 ## debit
91 <div class="act_as_cell amount">${_('Debit')}</div>
92 ## credit
93 <div class="act_as_cell amount">${_('Credit')}</div>
94 %if amount_currency(data):
95 ## currency balance
96 <div class="act_as_cell amount sep_left">${_('Curr. Balance')}</div>
97 ## curency code
98 <div class="act_as_cell amount" style="text-align: right;">${_('Curr.')}</div>
99 %endif
100 </div>
101 </div>
102 %for move in journal_period.moves:
103 <%
104 new_move = True
105 %>
106
107 %for line in move.line_id:
108 <div class="act_as_tbody">
109 <%
110 account_total_debit += line.debit or 0.0
111 account_total_credit += line.credit or 0.0
112 %>
113 <div class="act_as_row lines">
114 ## date
115 <div class="act_as_cell first_column">${formatLang(move.date, date=True) if new_move else ''}</div>
116 ## move
117 <div class="act_as_cell">${move.name if new_move else ''}</div>
118 ## account code
119 <div class="act_as_cell">${line.account_id.code}</div>
120 ## date
121 <div class="act_as_cell">${formatLang(line.date_maturity or '', date=True)}</div>
122 ## partner
123 <div class="act_as_cell overflow_ellipsis" style="width: 280px;">${line.partner_id.name if new_move else ''}</div>
124 ## label
125 <div class="act_as_cell overflow_ellipsis" style="width: 310px;">${line.name}</div>
126 ## debit
127 <div class="act_as_cell amount">${formatLang(line.debit) if line.debit else ''}</div>
128 ## credit
129 <div class="act_as_cell amount">${formatLang(line.credit) if line.credit else ''}</div>
130 %if amount_currency(data):
131 ## currency balance
132 <div class="act_as_cell amount sep_left">${formatLang(line.amount_currency) if line.amount_currency else ''}</div>
133 ## curency code
134 <div class="act_as_cell amount" style="text-align: right;">${line.currency_id.symbol or ''}</div>
135 %endif
136 </div>
137 <%
138 new_move = False
139 %>
140 </div>
141 %endfor
142 %endfor
143 <div class="act_as_row lines labels">
144 ## date
145 <div class="act_as_cell first_column"></div>
146 ## move
147 <div class="act_as_cell"></div>
148 ## account code
149 <div class="act_as_cell"></div>
150 ## date
151 <div class="act_as_cell"></div>
152 ## partner
153 <div class="act_as_cell" style="width: 280px;"></div>
154 ## label
155 <div class="act_as_cell" style="width: 310px;"></div>
156 ## debit
157 <div class="act_as_cell amount">${formatLang(account_total_debit) | amount }</div>
158 ## credit
159 <div class="act_as_cell amount">${formatLang(account_total_credit) | amount }</div>
160 %if amount_currency(data):
161 ## currency balance
162 <div class="act_as_cell amount sep_left"></div>
163 ## currency code
164 <div class="act_as_cell" style="text-align: right; right;"></div>
165 %endif
166 </div>
167 </div>
168 %endfor
169 </body>
170 </html>