Merge lp:~mukunde/unifield-server/US-6392 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 6259
Proposed branch: lp:~mukunde/unifield-server/US-6392
Merge into: lp:unifield-server
Diff against target: 6067 lines (+5298/-12) (has conflicts)
24 files modified
bin/addons/account/__openerp__.py (+1/-0)
bin/addons/account/account_menuitem.xml (+1/-0)
bin/addons/account/account_report.xml (+19/-0)
bin/addons/account/report/__init__.py (+1/-0)
bin/addons/account/report/account_employee_balance.rml (+360/-0)
bin/addons/account/report/account_employee_ledger.mako (+486/-0)
bin/addons/account/report/account_employee_ledger.py (+558/-0)
bin/addons/account/report/account_employee_ledger.rml (+777/-0)
bin/addons/account/report/account_employee_ledger_other.rml (+653/-0)
bin/addons/account/wizard/__init__.py (+3/-2)
bin/addons/account/wizard/account_report_common_employee.py (+86/-0)
bin/addons/account/wizard/account_report_employee_balance.py (+55/-0)
bin/addons/account/wizard/account_report_employee_ledger.py (+127/-0)
bin/addons/account/wizard/account_report_employee_ledger_view.xml (+85/-0)
bin/addons/finance/__openerp__.py (+1/-0)
bin/addons/finance/account_view.xml (+11/-1)
bin/addons/finance/report/__init__.py (+1/-0)
bin/addons/finance/report/account_employee_balance_tree.py (+311/-0)
bin/addons/finance/report/account_employee_balance_tree_xls.mako (+530/-0)
bin/addons/finance/report/account_report_name.py (+24/-0)
bin/addons/finance/wizard/__init__.py (+1/-0)
bin/addons/finance/wizard/account_report_employee_balance_tree.py (+553/-0)
bin/addons/finance/wizard/account_report_employee_balance_tree_view.xml (+177/-0)
bin/addons/msf_profile/i18n/fr_MF.po (+477/-9)
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
To merge this branch: bzr merge lp:~mukunde/unifield-server/US-6392
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+422841@code.launchpad.net
To post a comment you must log in.
lp:~mukunde/unifield-server/US-6392 updated
6236. By Gaƫl Mukunde

US-6392 [IMP] Remove hard coded payment methods and the required attribute on payment method filter

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/addons/account/__openerp__.py'
--- bin/addons/account/__openerp__.py 2020-04-16 14:07:13 +0000
+++ bin/addons/account/__openerp__.py 2022-06-01 15:15:45 +0000
@@ -112,6 +112,7 @@
112 "wizard/account_report_profit_loss_view.xml",112 "wizard/account_report_profit_loss_view.xml",
113 "wizard/account_report_balance_sheet_view.xml",113 "wizard/account_report_balance_sheet_view.xml",
114 "wizard/account_report_liquidity_balance_view.xml",114 "wizard/account_report_liquidity_balance_view.xml",
115 "wizard/account_report_employee_ledger_view.xml",
115 ],116 ],
116 'demo_xml': [117 'demo_xml': [
117 'account_demo.xml',118 'account_demo.xml',
118119
=== modified file 'bin/addons/account/account_menuitem.xml'
--- bin/addons/account/account_menuitem.xml 2021-10-14 12:15:46 +0000
+++ bin/addons/account/account_menuitem.xml 2022-06-01 15:15:45 +0000
@@ -52,6 +52,7 @@
52 groups="group_account_user,group_account_manager"52 groups="group_account_user,group_account_manager"
53 name="Journals"/>53 name="Journals"/>
54 <menuitem id="next_id_22" name="Partners" parent="final_accounting_reports" sequence="120"/>54 <menuitem id="next_id_22" name="Partners" parent="final_accounting_reports" sequence="120"/>
55 <menuitem id="employee_menu" name="Employees" parent="final_accounting_reports" sequence="130"/>
5556
56 </data>57 </data>
57</openerp>58</openerp>
5859
=== modified file 'bin/addons/account/account_report.xml'
--- bin/addons/account/account_report.xml 2020-04-22 09:04:55 +0000
+++ bin/addons/account/account_report.xml 2022-06-01 15:15:45 +0000
@@ -36,6 +36,25 @@
36 attachment="(object.state in ('open','paid', 'inv_close')) and ('INV'+(object.number or '').replace('/',''))"36 attachment="(object.state in ('open','paid', 'inv_close')) and ('INV'+(object.number or '').replace('/',''))"
37 attachment_use="1"37 attachment_use="1"
38 multi="True"/>38 multi="True"/>
39
40 <report auto="False" id="account_employee_ledger" menu="False" model="hr.employee" name="account.employee_ledger" rml="account/report/account_employee_ledger.rml" string="Employee Ledger" target_filename="Employee Ledger_%(instance_code)s_%(year)s%(month)s%(day)s" />
41 <report auto="False" id="account_employee_ledger_other" menu="False" model="hr.employee" name="account.employee_ledger_other" rml="account/report/account_employee_ledger_other.rml" string="Employee Ledger" target_filename="Employee Ledger_%(instance_code)s_%(year)s%(month)s%(day)s"/>
42
43 <report id="account_employee_ledger_xls"
44 auto="False"
45 menu="False"
46 header="False"
47 model="account.account"
48 name="account.employee_ledger_xls"
49 file="account/report/account_employee_ledger.mako"
50 report_type="webkit"
51 target_filename="Employee Ledger_%(instance_code)s_%(year)s%(month)s%(day)s"
52 string="Employee Ledger xls"/>
53
54 <report auto="False" id="account_employee_account_balance" menu="False" model="account.employee.balance.tree"
55 name="account.employee.balance" rml="account/report/account_employee_balance.rml"
56 string="Employee Balance" target_filename="Employee Balance_%(instance_code)s_%(year)s%(month)s%(day)s" />
57
39 <report id="account_transfers" model="account.transfer" name="account.transfer" string="Transfers" xml="account/report/transfer.xml" xsl="account/report/transfer.xsl"/>58 <report id="account_transfers" model="account.transfer" name="account.transfer" string="Transfers" xml="account/report/transfer.xml" xsl="account/report/transfer.xsl"/>
40 <report auto="False" id="account_intracom" menu="False" model="account.move.line" name="account.intracom" string="IntraCom"/>59 <report auto="False" id="account_intracom" menu="False" model="account.move.line" name="account.intracom" string="IntraCom"/>
4160
4261
=== modified file 'bin/addons/account/report/__init__.py'
--- bin/addons/account/report/__init__.py 2020-04-14 13:50:39 +0000
+++ bin/addons/account/report/__init__.py 2022-06-01 15:15:45 +0000
@@ -44,6 +44,7 @@
44import free_allocation_report44import free_allocation_report
45import invoice_excel_export45import invoice_excel_export
46import export_invoice46import export_invoice
47import account_employee_ledger
4748
48# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:49# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4950
5051
=== added file 'bin/addons/account/report/account_employee_balance.rml'
--- bin/addons/account/report/account_employee_balance.rml 1970-01-01 00:00:00 +0000
+++ bin/addons/account/report/account_employee_balance.rml 2022-06-01 15:15:45 +0000
@@ -0,0 +1,360 @@
1<?xml version="1.0"?>
2<document filename="Employee Balance.pdf">
3 <template pageSize="(595.0,842.0)" title="Employee Balance" author="Tempo Consulting" allowSplitting="20">
4 <pageTemplate id="first">
5 <frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
6 </pageTemplate>
7 </template>
8 <stylesheet>
9 <blockTableStyle id="Standard_Outline">
10 <blockAlignment value="LEFT"/>
11 <blockValign value="TOP"/>
12 </blockTableStyle>
13 <blockTableStyle id="Table1">
14 <blockAlignment value="LEFT"/>
15 <blockValign value="TOP"/>
16 <blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
17 <blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
18 <blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
19 <blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
20 <blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
21 <blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
22 </blockTableStyle>
23 <blockTableStyle id="Table6">
24 <blockAlignment value="LEFT"/>
25 <blockValign value="TOP"/>
26 <lineStyle kind="GRID" colorName="black"/>
27 </blockTableStyle>
28 <blockTableStyle id="Table_Company_Name">
29 <blockAlignment value="LEFT"/>
30 <blockValign value="TOP"/>
31 </blockTableStyle>
32 <blockTableStyle id="Table2">
33 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
34 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
35 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,2" stop="-1,2"/>
36 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,3" stop="-1,-1"/>
37 <blockValign value="TOP"/>
38 <blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/>
39 </blockTableStyle>
40 <blockTableStyle id="Table3">
41 <blockAlignment value="LEFT"/>
42 <blockValign value="TOP"/>
43 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
44 </blockTableStyle>
45 <blockTableStyle id="Table4">
46 <blockAlignment value="LEFT"/>
47 <blockValign value="TOP"/>
48 <lineStyle kind="GRID" colorName="black"/>
49 </blockTableStyle>
50 <blockTableStyle id="Tableau3">
51 <blockAlignment value="LEFT"/>
52 <blockValign value="TOP"/>
53 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" />
54 <lineStyle kind="OUTLINE" colorName="#e6e6e6" />
55 <blockBackground colorName="white" start="0,0" stop="-1,0"/>
56 </blockTableStyle>
57 <blockTableStyle id="Table_Sub_Header_Content">
58 <blockAlignment value="LEFT"/>
59 <blockValign value="TOP"/>
60 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
61 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
62 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
63 <lineStyle kind="LINEBEFORE" 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 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
67 <lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/>
68 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
69 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
70 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
71 <lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/>
72 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
73 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
74 <lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/>
75 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
76 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
77 <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
78 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
79 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
80 </blockTableStyle>
81 <blockTableStyle id="Table2_header">
82 <blockAlignment value="LEFT"/>
83 <blockValign value="TOP"/>
84 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
85 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
86 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
87 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
88 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
89 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
90 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
91 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
92 <lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/>
93 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
94 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
95 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
96 <lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/>
97 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
98 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
99 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
100 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
101 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
102 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/>
103 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
104 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
105 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/>
106 <lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/>
107 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/>
108 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/>
109 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/>
110 <lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/>
111 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/>
112 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/>
113 </blockTableStyle>
114
115 <blockTableStyle id="Table_Subheader_Content_detail">
116 <blockAlignment value="LEFT"/>
117 <blockValign value="TOP"/>
118 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
119 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
120 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
121 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
122 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
123 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
124 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
125 <lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/>
126 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
127 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
128 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
129 <lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/>
130 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
131 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
132 <lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/>
133 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
134 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
135 <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/>
136 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/>
137 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
138 </blockTableStyle>
139
140 <initialize>
141 <paraStyle name="all" alignment="justify"/>
142 </initialize>
143
144 <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
145 <paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
146 <paraStyle name="P4Bold" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
147 <paraStyle name="P5" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
148 <paraStyle name="P6" fontName="Helvetica" fontSize="11.0" leading="12" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
149 <paraStyle name="P7" fontName="Helvetica-Bold" fontSize="9" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
150 <paraStyle name="P8" fontName="Helvetica-Bold" fontSize="9" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
151 <paraStyle name="P9" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
152 <paraStyle name="P9b" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
153 <paraStyle name="P10" fontName="Helvetica" alignment="CENTER"/>
154 <paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="10"/>
155 <paraStyle name="P12" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
156 <paraStyle name="P12a" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
157 <paraStyle name="P12b" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
158 <paraStyle name="P13" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
159 <paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Times-Bold" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
160 <paraStyle name="P15" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
161 <paraStyle name="Standard" fontName="Helvetica"/>
162 <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
163 <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
164 <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
165 <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
166 <paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
167 <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
168 <paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="11" spaceBefore="6.0" spaceAfter="6.0"/>
169 <paraStyle name="Index" fontName="Helvetica"/>
170 <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
171 <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
172 <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
173 <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
174 </stylesheet>
175
176 <story>
177 <blockTable colWidths="539.0" style="Table_Company_Name">
178 <tr>
179 <td>
180 <para style="terp_header_Centre">Employee Balance</para>
181 </td>
182 </tr>
183 </blockTable>
184 <para style="terp_default_8">
185 <font color="white"> </font>
186 </para>
187 <section>
188 [[ repeatIn(get_employees(data), 'p_entries') ]]
189 <!-- NOTE: if this HEADER has to be modified: modify also the "no data" version (below) -->
190 <blockTable colWidths="50.0,37.0,81.0,50.0,91.0,118.0,90.0,43.0" style="Table2_header">
191 <tr>
192 <td><para style="terp_tblheader_General_Centre">Chart of Account</para></td>
193 <td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
194 <td><para style="terp_tblheader_General_Centre">Journals</para></td>
195 <td><para style="terp_tblheader_General_Centre">Accounts</para></td>
196 <td><para style="terp_tblheader_General_Centre">Proprietary Instances</para></td>
197 <td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!=translate('No Filter') and get_filter(data) ]]</para></td>
198 <td><para style="terp_tblheader_General_Centre">Display</para></td>
199 <td><para style="terp_tblheader_General_Centre">Func. Currency</para></td>
200 </tr>
201 <tr>
202 <td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
203 <td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
204 <td> <para style="terp_default_Centre_8">[[ get_journals_str(data) ]] </para></td>
205 <td><para style="terp_default_Centre_8">[[ get_accounts_str(data) ]]</para></td>
206 <td><para style="terp_default_Centre_8">[[ get_prop_instances_str(data, pdf=True) ]]</para></td>
207
208 <td><para style="terp_default_Centre_8">[[ get_filter(data)==translate('No Filter') and get_filter(data) or removeParentNode('para') ]] </para>
209 <blockTable colWidths="55.0,55.0" style="Table3">[[ get_filter(data)==translate('Date') or removeParentNode('blockTable') ]]
210 <tr>
211 <td><para style="terp_tblheader_General_Centre">Start Date</para></td>
212 <td><para style="terp_tblheader_General_Centre">End Date</para></td>
213 </tr>
214 <tr>
215 <td><para style="terp_default_Centre_8">[[ formatLang(get_start_date(data),date=True) ]]</para></td>
216 <td><para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</para></td>
217 </tr>
218 </blockTable>
219 <blockTable colWidths="55.0,55.0" style="Table3">[[ get_filter(data)==translate('Periods') or removeParentNode('blockTable') ]]
220 <tr>
221 <td><para style="terp_tblheader_General_Centre">Start Period</para></td>
222 <td><para style="terp_tblheader_General_Centre">End Period</para></td>
223 </tr>
224 <tr>
225 <td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
226 <td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
227 </tr>
228 </blockTable>
229 </td>
230 <td>
231 <para style="terp_default_Centre_8">[[ "%s: %s, %s: %s, %s: %s, %s: %s, %s: %s, %s: %s" % (translate("Employee's"), get_type_of_accounts(), translate('Target Moves'), get_target_move(data), translate('Reconciled'), get_reconcile_selection(data), translate('Display Employees'), get_display_employees_selection(data), translate('Employee Type'), get_employee_type(data), translate('Payment Method'), get_payment_methods(data)) ]]</para>
232 </td>
233 <td>
234 <para style="terp_default_Centre_8">[[ company.currency_id.name ]]</para>
235 </td>
236 </tr>
237 </blockTable>
238
239 <para style="terp_default_8">
240 <font color="white"> </font>
241 </para>
242 <blockTable colWidths="140.0,55.0,75.0,65.0,70.0,70.0,69.0" repeatRows="1" style="Table2">
243 <tr>
244 <td><para style="P12a">Employee</para></td>
245 <td><para style="P12b">Account</para></td>
246 <td><para style="P12b">Currency</para></td>
247 <td><para style="P12b">Debit</para></td>
248 <td><para style="P12b">Credit</para></td>
249 <td><para style="P12b">Booking Balance</para></td>
250 <td><para style="P12b">Balance [[ company.currency_id.name ]]</para></td>
251 </tr>
252 <tr>
253 <td><para style="P7">TOTAL EMPLOYEES:</para></td>
254 <td><para style="P8"></para></td>
255 <td><para style="P8"><u>[[ company.currency_id.name ]]</u></para></td>
256 <td><para style="P8"><u>[[ formatLang(get_employees_total_debit_credit_balance(data)[0] or 0.0) ]]</u></para></td>
257 <td><para style="P8"><u>[[ formatLang(get_employees_total_debit_credit_balance(data)[1] or 0.0) ]]</u></para></td>
258 <td><para style="P10">-</para></td>
259 <td><para style="P8"><u>[[ formatLang(get_employees_total_debit_credit_balance(data)[2] or 0.0) ]]</u></para></td>
260 </tr>
261 <tr>
262 [[ repeatIn(p_entries, 'p_obj') ]]
263 <!-- For each employee: show one header line and the detail per account -->
264 <td>
265 <blockTable colWidths="135.0,69.0,60.0,63.0,71.0,68.0,68.0">
266 <tr>
267 <td><para style="P15">[[ p_obj.name or '' ]]</para></td>
268 <td><para style="P15"></para></td>
269 <td><para style="P4Bold">[[ company.currency_id.name ]]</para></td>
270 <td><para style="P4Bold" fontSize="8.5">[[ formatLang(p_obj.debit or 0.0) ]]</para></td>
271 <td><para style="P4Bold" fontSize="8.5">[[ formatLang(p_obj.credit or 0.0) ]]</para></td>
272 <td><para style="P4Bold" fontSize="8.5">[[ formatLang(p_obj.balance or 0.0) ]]</para></td>
273 <td><para style="P4Bold" fontSize="8.5">[[ formatLang(p_obj.balance or 0.0) ]]</para></td>
274 </tr>
275 <tr>
276 [[ repeatIn(get_employee_account_move_lines(p_obj.employee_id.id, data), 'aml') ]]
277 <!-- For each account: display one line with the total in functional currency,
278 and one line per booking currency used -->
279 <td>
280 <blockTable colWidths="151.0,28.0,79.0,64.0,72.0,67.0,67.0">
281 <tr>
282 <td><para style="P4Bold"></para></td>
283 <td><para style="P4Bold">[[ aml.get('account', '') ]]</para></td>
284 <td><para style="P4Bold">[[ company.currency_id.name ]]</para></td>
285 <td><para style="P4Bold">[[ formatLang(aml.get('deb') or 0.0) ]]</para></td>
286 <td><para style="P4Bold">[[ formatLang(aml.get('cred') or 0.0) ]]</para></td>
287 <td><para style="P4Bold">[[ formatLang(aml.get('total') or 0.0) ]]</para></td>
288 <td><para style="P4Bold">[[ formatLang(aml.get('total') or 0.0) ]]</para></td>
289 </tr>
290 <tr>
291 [[ repeatIn(get_lines_per_currency(p_obj.employee_id.id, data, aml.get('account')), 'detail_line') ]]
292 <td><para style="P4"></para></td>
293 <td><para style="P4">Subtotal</para></td>
294 <td><para style="P4">[[ detail_line.get('currency_booking', '') ]]</para></td>
295 <td><para style="P4">[[ formatLang(detail_line.get('debit_booking') or 0.0) ]]</para></td>
296 <td><para style="P4">[[ formatLang(detail_line.get('credit_booking') or 0.0) ]]</para></td>
297 <td><para style="P4">[[ formatLang(detail_line.get('total_booking') or 0.0) ]]</para></td>
298 <td><para style="P4">[[ formatLang(detail_line.get('total_functional') or 0.0) ]]</para></td>
299 </tr>
300 </blockTable>
301 </td>
302 </tr>
303 </blockTable>
304 </td>
305 </tr>
306 </blockTable>
307 </section>
308 <!-- if there is NO DATA to be displayed: display the header only -->
309 <blockTable colWidths="50.0,37.0,81.0,50.0,91.0,118.0,90.0,43.0" style="Table2_header">
310 [[ get_has_data() and removeParentNode('blockTable') ]]
311 <tr>
312 <td><para style="terp_tblheader_General_Centre">Chart of Account</para></td>
313 <td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
314 <td><para style="terp_tblheader_General_Centre">Journals</para></td>
315 <td><para style="terp_tblheader_General_Centre">Accounts</para></td>
316 <td><para style="terp_tblheader_General_Centre">Proprietary Instances</para></td>
317 <td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!=translate('No Filter') and get_filter(data) ]]</para></td>
318 <td><para style="terp_tblheader_General_Centre">Display</para></td>
319 <td><para style="terp_tblheader_General_Centre">Func. Currency</para></td>
320 </tr>
321 <tr>
322 <td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
323 <td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
324 <td> <para style="terp_default_Centre_8">[[ get_journals_str(data) ]] </para></td>
325 <td><para style="terp_default_Centre_8">[[ get_accounts_str(data) ]]</para></td>
326 <td><para style="terp_default_Centre_8">[[ get_prop_instances_str(data, pdf=True) ]]</para></td>
327
328 <td><para style="terp_default_Centre_8">[[ get_filter(data)==translate('No Filter') and get_filter(data) or removeParentNode('para') ]] </para>
329 <blockTable colWidths="55.0,55.0" style="Table3">[[ get_filter(data)==translate('Date') or removeParentNode('blockTable') ]]
330 <tr>
331 <td><para style="terp_tblheader_General_Centre">Start Date</para></td>
332 <td><para style="terp_tblheader_General_Centre">End Date</para></td>
333 </tr>
334 <tr>
335 <td><para style="terp_default_Centre_8">[[ formatLang(get_start_date(data),date=True) ]]</para></td>
336 <td><para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</para></td>
337 </tr>
338 </blockTable>
339 <blockTable colWidths="55.0,55.0" style="Table3">[[ get_filter(data)==translate('Periods') or removeParentNode('blockTable') ]]
340 <tr>
341 <td><para style="terp_tblheader_General_Centre">Start Period</para></td>
342 <td><para style="terp_tblheader_General_Centre">End Period</para></td>
343 </tr>
344 <tr>
345 <td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td>
346 <td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td>
347 </tr>
348 </blockTable>
349 </td>
350 <td>
351 <para style="terp_default_Centre_8">[[ "%s: %s, %s: %s, %s: %s, %s: %s, %s: %s, %s: %s" % (translate("Employee's"), get_type_of_accounts(), translate('Target Moves'), get_target_move(data), translate('Reconciled'), get_reconcile_selection(data), translate('Display Employees'), get_display_employees_selection(data), translate('Employee Type'), get_employee_type(data), translate('Payment Method'), get_payment_methods(data)) ]]</para>
352 </td>
353 <td>
354 <para style="terp_default_Centre_8">[[ company.currency_id.name ]]</para>
355 </td>
356 </tr>
357 </blockTable>
358
359 </story>
360</document>
0361
=== added file 'bin/addons/account/report/account_employee_ledger.mako'
--- bin/addons/account/report/account_employee_ledger.mako 1970-01-01 00:00:00 +0000
+++ bin/addons/account/report/account_employee_ledger.mako 2022-06-01 15:15:45 +0000
@@ -0,0 +1,486 @@
1<?xml version="1.0"?>
2<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
3xmlns:o="urn:schemas-microsoft-com:office:office"
4xmlns:x="urn:schemas-microsoft-com:office:excel"
5xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
6xmlns:html="http://www.w3.org/TR/REC-html40">
7<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
8<Title>Employee</Title>
9</DocumentProperties>
10<Styles>
11<Style ss:ID="ssCell">
12<Alignment ss:Vertical="Top" ss:WrapText="1"/>
13</Style>
14<Style ss:ID="ssCellRight">
15<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
16</Style>
17<Style ss:ID="ssCellRightBold">
18<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
19<Font ss:Bold="1" />
20</Style>
21<Style ss:ID="ssH">
22<Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/>
23<Font ss:Bold="1" />
24<Borders>
25 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
26 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
27 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
28 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
29</Borders>
30</Style>
31<Style ss:ID="ssBorder">
32<Alignment ss:Vertical="Center" ss:WrapText="1"/>
33<Borders>
34 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
35 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
36 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
37 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
38</Borders>
39</Style>
40<Style ss:ID="ssBorderDate">
41<Alignment ss:Vertical="Center" ss:WrapText="1"/>
42<Borders>
43 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
44 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
45 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
46 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
47</Borders>
48<NumberFormat ss:Format="Short Date" />
49</Style>
50<Style ss:ID="ssNumber">
51<Borders>
52 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
53 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
54 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
55 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
56</Borders>
57<Alignment ss:Horizontal="Right" ss:Vertical="Center" ss:WrapText="1"/>
58<NumberFormat ss:Format="#,##0.00"/>
59</Style>
60<Style ss:ID="ssHeader">
61<Alignment ss:Vertical="Top" ss:Horizontal="Center" ss:WrapText="1"/>
62<Font ss:Bold="1" />
63<Borders>
64 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
65 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
66 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
67 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
68</Borders>
69</Style>
70<Style ss:ID="ssHeaderNumber">
71<Font ss:Bold="1" />
72<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
73<Borders>
74 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
75 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
76 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
77 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
78</Borders>
79<NumberFormat ss:Format="#,##0.00"/>
80</Style>
81<Style ss:ID="ssHeaderRight">
82<Font ss:Bold="1" />
83<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
84<Borders>
85 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
86 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
87 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
88 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
89</Borders>
90</Style>
91<Style ss:ID="ssHeaderCell">
92<Alignment ss:Vertical="Top" ss:Horizontal="Center" ss:WrapText="1"/>
93<Borders>
94 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
95 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
96 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
97 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
98</Borders>
99</Style>
100<Style ss:ID="ssHeaderNumberCell">
101<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
102<Borders>
103 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
104 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
105 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
106 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
107</Borders>
108<NumberFormat ss:Format="#,##0.00"/>
109</Style>
110<Style ss:ID="ssEmployee">
111<Alignment ss:Vertical="Top" ss:WrapText="1"/>
112<Font ss:Bold="1" />
113<Borders>
114 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
115 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
116 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
117 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
118</Borders>
119</Style>
120<Style ss:ID="ssEmployeeNumber">
121<Font ss:Bold="1" />
122<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
123<Borders>
124 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
125 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
126 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
127 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
128</Borders>
129<NumberFormat ss:Format="#,##0.00"/>
130</Style>
131<Style ss:ID="ssEmployeeRight">
132<Font ss:Bold="1" />
133<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
134<Borders>
135 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
136 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
137 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
138 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
139</Borders>
140</Style>
141<Style ss:ID="ssAccountLine">
142<Alignment ss:Vertical="Top" ss:Horizontal="Left" ss:WrapText="1"/>
143<Font ss:Size="8"/>
144<Borders>
145 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
146 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
147 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
148 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
149</Borders>
150</Style>
151<Style ss:ID="ssSubtotalLineLeft">
152<Alignment ss:Vertical="Top" ss:Horizontal="Left" ss:WrapText="1"/>
153<Font ss:Size="10"/>
154<Borders>
155 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
156 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
157 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
158 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
159</Borders>
160</Style>
161<Style ss:ID="ssSubtotalLineRight">
162<Alignment ss:Vertical="Top" ss:Horizontal="Right" ss:WrapText="1"/>
163<Font ss:Size="10"/>
164<Borders>
165 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
166 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
167 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
168 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
169</Borders>
170</Style>
171<Style ss:ID="ssAccountLineWrap">
172 <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1"/>
173 <Borders>
174 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
175 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
176 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
177 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
178 </Borders>
179 <Font ss:Size="8"/>
180 <Interior/>
181 <NumberFormat/>
182 <Protection/>
183</Style>
184<Style ss:ID="ssAccountLineNumber">
185<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
186<Font ss:Size="8"/>
187<Borders>
188 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
189 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
190 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
191 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
192</Borders>
193<NumberFormat ss:Format="#,##0.00"/>
194</Style>
195<Style ss:ID="ssSubtotalLineNumber">
196<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
197<Font ss:Size="10"/>
198<Borders>
199 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
200 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
201 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
202 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
203</Borders>
204<NumberFormat ss:Format="#,##0.00"/>
205</Style>
206<Style ss:ID="ssAccountLineAccountCode">
207<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
208<Font ss:Size="8"/>
209<Borders>
210 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
211 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
212 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
213 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
214</Borders>
215<Interior/>
216<NumberFormat ss:Format="0" />
217<Protection/>
218</Style>
219</Styles>
220<Worksheet ss:Name="${( get_employees() )|x}">
221<Table x:FullColumns="1" x:FullRows="1">
222<Column ss:AutoFitWidth="1" ss:Width="140" />
223<Column ss:AutoFitWidth="1" ss:Width="60" />
224<Column ss:AutoFitWidth="1" ss:Width="70" />
225<Column ss:AutoFitWidth="1" ss:Width="80" />
226<Column ss:AutoFitWidth="1" ss:Width="45" />
227<Column ss:AutoFitWidth="1" ss:Width="125" />
228<Column ss:AutoFitWidth="1" ss:Width="60" />
229<Column ss:AutoFitWidth="1" ss:Width="80" />
230<Column ss:AutoFitWidth="1" ss:Width="80" />
231<Column ss:AutoFitWidth="1" ss:Width="80" />
232<Column ss:AutoFitWidth="1" ss:Width="80" />
233<Column ss:AutoFitWidth="1" ss:Width="80" />
234<!-- LIST OF SELECTED FILTERS -->
235<%
236selected_filter = get_filter(data) or ''
237%>
238<Row>
239 <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Chart of Account')}</Data></Cell>
240 <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Fiscal Year')}</Data></Cell>
241 <Cell ss:StyleID="ssHeader" ss:MergeAcross="1"><Data ss:Type="String">${_('Journals')}</Data></Cell>
242 <Cell ss:StyleID="ssHeader" ss:MergeAcross="1"><Data ss:Type="String">${_('Accounts')}</Data></Cell>
243 <Cell ss:StyleID="ssHeader" ss:MergeAcross="1"><Data ss:Type="String">${_('Proprietary Instances')}</Data></Cell>
244 <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${'%s %s' % (_('Filter By'), (selected_filter != _('No Filter') and selected_filter or ''))|x}</Data></Cell>
245 <Cell ss:StyleID="ssHeader" ss:MergeAcross="1"><Data ss:Type="String">${_('Display')}</Data></Cell>
246 <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Func. Currency')}</Data></Cell>
247</Row>
248<%
249if selected_filter == _('Date'):
250 filter = '%s - %s' % (formatLang(get_start_date(data), date=True), formatLang(get_end_date(data), date=True))
251elif selected_filter == _('Periods'):
252 filter = '%s - %s' % (get_start_period(data), get_end_period(data))
253else:
254 filter = selected_filter
255%>
256<Row>
257 <Cell ss:StyleID="ssHeaderCell">
258 <Data ss:Type="String">${ get_account(data) or ''|x}</Data>
259 </Cell>
260 <Cell ss:StyleID="ssHeaderCell">
261 <Data ss:Type="String">${ get_fiscalyear(data) or ''|x}</Data>
262 </Cell>
263 <Cell ss:StyleID="ssHeaderCell" ss:MergeAcross="1">
264 <Data ss:Type="String">${ get_journals_str(data)|x}</Data>
265 </Cell>
266 <Cell ss:StyleID="ssHeaderCell" ss:MergeAcross="1">
267 <Data ss:Type="String">${ get_accounts_str(data)|x}</Data>
268 </Cell>
269 <Cell ss:StyleID="ssHeaderCell" ss:MergeAcross="1">
270 <Data ss:Type="String">${ get_instances_str(data)|x}</Data>
271 </Cell>
272 <Cell ss:StyleID="ssHeaderCell">
273 <Data ss:Type="String">${ filter|x}</Data>
274 </Cell>
275 <Cell ss:StyleID="ssHeaderCell" ss:MergeAcross="1">
276 <Data ss:Type="String">${ "%s: %s, %s: %s, %s: %s, %s: %s, %s: %s, %s: %s" % (
277 _("Employee's"), get_employees(),
278 _('Target Moves'), get_target_move(data),
279 _('Reconciled'), get_reconcile_selection(),
280 _('Display Employees'), get_display_employees_selection(),
281 _('Employee Type'), get_employee_type(data) or '-',
282 _('Payment Method'), get_payment_methods(data) or '-',
283 )|x}</Data>
284 </Cell>
285 <Cell ss:StyleID="ssHeaderCell">
286 <Data ss:Type="String">${ company.currency_id.name |x}</Data>
287 </Cell>
288</Row>
289
290<!-- TABLE HEADER -->
291<Row></Row>
292<Row>
293<Cell ss:StyleID="ssHeader">
294 <Data ss:Type="String">${_('Employee')}</Data>
295</Cell>
296<Cell ss:StyleID="ssHeader">
297 <Data ss:Type="String">${_('Date')}</Data>
298</Cell>
299<Cell ss:StyleID="ssHeader">
300 <Data ss:Type="String">${_('JRNL')}</Data>
301</Cell>
302<Cell ss:StyleID="ssHeader">
303 <Data ss:Type="String">${_('Entry Sequence')}</Data>
304</Cell>
305<Cell ss:StyleID="ssHeader">
306 <Data ss:Type="String">${_('Account')}</Data>
307</Cell>
308<Cell ss:StyleID="ssHeader">
309 <Data ss:Type="String">${_('Entry Label')}</Data>
310</Cell>
311<Cell ss:StyleID="ssHeader">
312 <Data ss:Type="String">${_('Reconcile Number')}</Data>
313</Cell>
314<Cell ss:StyleID="ssHeader">
315 <Data ss:Type="String">${_('Currency')}</Data>
316</Cell>
317<Cell ss:StyleID="ssHeaderRight">
318 <Data ss:Type="String">${_('Debit')}</Data>
319</Cell>
320<Cell ss:StyleID="ssHeaderRight">
321 <Data ss:Type="String">${_('Credit')}</Data>
322</Cell>
323<Cell ss:StyleID="ssHeaderRight">
324 <Data ss:Type="String">${_('Booking Balance')}</Data>
325</Cell>
326<Cell ss:StyleID="ssHeaderRight">
327 <Data ss:Type="String">${'%s %s' % (_('Balance'), company.currency_id.name)|x}</Data>
328</Cell>
329</Row>
330
331% for p in employees_to_display(objects):
332<!-- EMPLOYEE HEADER -->
333<Row>
334<Cell ss:StyleID="ssEmployee">
335 <Data ss:Type="String">${p.name_resource or ''|x}</Data>
336</Cell>
337<Cell ss:StyleID="ssEmployee" ss:MergeAcross="5">
338 <Data ss:Type="String"></Data>
339</Cell>
340<Cell ss:StyleID="ssEmployee">
341 <Data ss:Type="String">${company.currency_id.name|x}</Data>
342</Cell>
343<Cell ss:StyleID="ssEmployeeNumber">
344 <Data ss:Type="Number">${sum_debit_employee(p) or 0.|x}</Data>
345</Cell>
346<Cell ss:StyleID="ssEmployeeNumber">
347 <Data ss:Type="Number">${sum_credit_employee(p) or 0.|x}</Data>
348</Cell>
349<Cell ss:StyleID="ssEmployeeNumber">
350 <Data ss:Type="Number">${(sum_debit_employee(p) or 0.) - (sum_credit_employee(p) or 0.)|x}</Data>
351</Cell>
352<Cell ss:StyleID="ssEmployeeNumber">
353 <Data ss:Type="Number">${(sum_debit_employee(p) or 0.) - (sum_credit_employee(p) or 0.)|x}</Data>
354</Cell>
355</Row>
356
357% for account_code in get_accounts_to_display(p):
358 <!-- TOTALS IN FUNCTIONAL -->
359 <%
360 fctal_totals = get_fctal_totals(p, account_code)
361 %>
362 <Row>
363 <Cell ss:StyleID="ssSubtotalLineRight">
364 <Data ss:Type="String">${p.name_resource or ''|x}</Data>
365 </Cell>
366 <Cell ss:MergeAcross="5" ss:StyleID="ssSubtotalLineRight">
367 <Data ss:Type="String">${ account_code |x}</Data>
368 </Cell>
369 <Cell ss:StyleID="ssSubtotalLineLeft">
370 <Data ss:Type="String">${ company.currency_id.name |x}</Data>
371 </Cell>
372 <Cell ss:StyleID="ssSubtotalLineNumber">
373 <Data ss:Type="Number">${ fctal_totals['debit_functional'] or 0.0|x}</Data>
374 </Cell>
375 <Cell ss:StyleID="ssSubtotalLineNumber">
376 <Data ss:Type="Number">${ fctal_totals['credit_functional'] or 0.0|x}</Data>
377 </Cell>
378 <Cell ss:StyleID="ssSubtotalLineNumber">
379 <Data ss:Type="Number">${ fctal_totals['total_functional'] or 0.0|x}</Data>
380 </Cell>
381 <Cell ss:StyleID="ssSubtotalLineNumber">
382 <Data ss:Type="Number">${ fctal_totals['total_functional'] or 0.0|x}</Data>
383 </Cell>
384 </Row>
385 <!-- SUBTOTAL LINES IN BOOKING -->
386 <%
387 subtotals = get_subtotals(p, account_code)
388 %>
389 % for curr in subtotals:
390 <Row>
391 <Cell ss:StyleID="ssSubtotalLineRight">
392 <Data ss:Type="String">${p.name_resource or ''|x}</Data>
393 </Cell>
394 <Cell ss:MergeAcross="5" ss:StyleID="ssSubtotalLineRight">
395 <Data ss:Type="String">${ _('Subtotal') |x}</Data>
396 </Cell>
397 <Cell ss:StyleID="ssSubtotalLineLeft">
398 <Data ss:Type="String">${ curr or '' |x}</Data>
399 </Cell>
400 <Cell ss:StyleID="ssSubtotalLineNumber">
401 <Data ss:Type="Number">${ subtotals[curr]['debit'] or 0.0|x}</Data>
402 </Cell>
403 <Cell ss:StyleID="ssSubtotalLineNumber">
404 <Data ss:Type="Number">${ subtotals[curr]['credit'] or 0.0|x}</Data>
405 </Cell>
406 <Cell ss:StyleID="ssSubtotalLineNumber">
407 <Data ss:Type="Number">${ subtotals[curr]['amount_currency'] or 0.0|x}</Data>
408 </Cell>
409 <Cell ss:StyleID="ssSubtotalLineNumber">
410 <Data ss:Type="Number">${ subtotals[curr]['total_functional'] or 0.0|x}</Data>
411 </Cell>
412 </Row>
413 % endfor
414 <!-- EMPLOYEE LINES -->
415 % for line in lines(p, account_code):
416 <Row>
417 <Cell ss:StyleID="ssAccountLine">
418 <Data ss:Type="String"></Data>
419 </Cell>
420 <Cell ss:StyleID="ssAccountLine">
421 <Data ss:Type="String">${formatLang(line['date'], date=True)|x}</Data>
422 </Cell>
423 <Cell ss:StyleID="ssAccountLine">
424 <Data ss:Type="String">${line['code']|x}</Data>
425 </Cell>
426 <Cell ss:StyleID="ssAccountLine">
427 <Data ss:Type="String">${line['move_name']|x}</Data>
428 </Cell>
429 <Cell ss:StyleID="ssAccountLine">
430 <Data ss:Type="String">${line['a_code']|x}</Data>
431 </Cell>
432 <%
433 entry_label = '%s - %s' % (line['ref'] or '', line['name'] or '')
434 %>
435 <Cell ss:StyleID="ssAccountLine">
436 <Data ss:Type="String">${ entry_label |x}</Data>
437 </Cell>
438 <Cell ss:StyleID="ssAccountLine">
439 <Data ss:Type="String">${ line['reconcile_txt'] or '' |x}</Data>
440 </Cell>
441 <Cell ss:StyleID="ssAccountLine">
442 <Data ss:Type="String">${ line['currency_code'] or '' |x}</Data>
443 </Cell>
444 <Cell ss:StyleID="ssAccountLineNumber">
445 <Data ss:Type="Number">${ line['debit'] or 0.0|x}</Data>
446 </Cell>
447 <Cell ss:StyleID="ssAccountLineNumber">
448 <Data ss:Type="Number">${ line['credit'] or 0.0|x}</Data>
449 </Cell>
450 <Cell ss:StyleID="ssAccountLineNumber">
451 <Data ss:Type="Number">${ line['amount_currency'] or 0.0|x}</Data>
452 </Cell>
453 <Cell ss:StyleID="ssAccountLineNumber">
454 <Data ss:Type="Number">${ line['total_functional'] or 0.0|x}</Data>
455 </Cell>
456 </Row>
457 % endfor
458% endfor
459% endfor
460
461</Table>
462<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
463 <FitToPage/>
464 <PageSetup>
465 <Layout x:Orientation="Landscape"/>
466 <Header x:Data="&amp;C&amp;&quot;Arial,Bold&quot;&amp;14Employee Ledger"/>
467 <Footer x:Data="Page &amp;P of &amp;N"/>
468 </PageSetup>
469 <Print>
470 <ValidPrinterInfo/>
471 <PaperSizeIndex>9</PaperSizeIndex>
472 <HorizontalResolution>600</HorizontalResolution>
473 <VerticalResolution>600</VerticalResolution>
474 </Print>
475 <Selected/>
476 <Panes>
477 <Pane>
478 <Number>3</Number>
479 <ActiveRow>17</ActiveRow>
480 </Pane>
481 </Panes>
482 <ProtectObjects>False</ProtectObjects>
483 <ProtectScenarios>False</ProtectScenarios>
484</WorksheetOptions>
485</Worksheet>
486</Workbook>
0487
=== added file 'bin/addons/account/report/account_employee_ledger.py'
--- bin/addons/account/report/account_employee_ledger.py 1970-01-01 00:00:00 +0000
+++ bin/addons/account/report/account_employee_ledger.py 2022-06-01 15:15:45 +0000
@@ -0,0 +1,558 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2022 TeMPO Consulting, MSF. All Rights Reserved
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23import re
24from report import report_sxw
25from common_report_header import common_report_header
26import pooler
27from spreadsheet_xml.spreadsheet_xml_write import SpreadsheetReport
28from tools.translate import _
29
30
31class employee_ledger(report_sxw.rml_parse, common_report_header):
32
33 def __init__(self, cr, uid, name, context=None):
34 super(employee_ledger, self).__init__(cr, uid, name, context=context)
35 self.fctal_totals = {} # to store the totals in functional currency
36 self.subtotals = {} # to store the subtotals per booking currency
37 self.accounts_to_display = {}
38 self.report_lines = {}
39 self.debit_balances = {}
40 self.credit_balances = {}
41 self.current_employee_number = 0
42 self.localcontext.update({
43 'employees_to_display': self._employees_to_display,
44 'time': time,
45 'lines': self.lines,
46 'sum_debit_employee': self._sum_debit_employee,
47 'sum_credit_employee': self._sum_credit_employee,
48 'get_currency': self._get_currency,
49 'comma_me': self.comma_me,
50 'get_start_period': self.get_start_period,
51 'get_end_period': self.get_end_period,
52 'get_account': self._get_account,
53 'get_filter': self._get_filter,
54 'get_start_date': self._get_start_date,
55 'get_end_date': self._get_end_date,
56 'get_fiscalyear': self._get_fiscalyear,
57 'get_journals_str': self._get_journals_str,
58 'get_employees':self._get_employees,
59 'get_target_move': self._get_target_move,
60 'get_reconcile_selection': self._get_reconcile_selection,
61 'get_display_employees_selection': self._get_display_employees_selection,
62 'get_instances_str': self._get_instances_str,
63 'get_accounts_str': self._get_accounts_str,
64 'format_entry_label': self._format_entry_label,
65 'get_accounts_to_display': self._get_accounts_to_display,
66 'get_fctal_totals': self._get_fctal_totals,
67 'get_subtotals': self._get_subtotals,
68 'nb_employees': lambda employees: len(self._employees_to_display(employees)),
69 'update_current_employee_number': self._update_current_employee_number,
70 'get_current_employee_number': lambda: self.current_employee_number,
71 'get_employee_type': self._get_employee_type,
72 'get_payment_methods': self._get_payment_methods,
73 })
74
75 def _get_employee_type(self, data):
76 """
77 Returns the String to display in the "Employee Type" section of the report header
78 """
79 emp_type = _('All')
80 # if specific employees are selected don't display emp type
81 if data['form'].get('employee_ids', False):
82 emp_type = '-'
83 else:
84 emp = data['form'].get('employee_type', False)
85 if emp == 'local':
86 emp_type = _('Local Staff')
87 if emp == 'ex':
88 emp_type = _('Expatriate Staff')
89 return emp_type
90
91 def _get_payment_methods(self, data):
92 """
93 Returns the String to display in the "Payment Method" section of the report header
94 """
95 pay_method = _('All')
96 # if specific employees are selected don't display payment method
97 if data['form'].get('employee_ids', False):
98 pay_method = '-'
99 else:
100 method = data['form'].get('payment_method')
101 if method != 'blank':
102 return method
103 return pay_method
104
105 def set_context(self, objects, data, ids, report_type=None):
106 obj_move = self.pool.get('account.move.line')
107 obj_employee = self.pool.get('hr.employee')
108 obj_fy = self.pool.get('account.fiscalyear')
109 used_context = data['form'].get('used_context', {})
110 self.reconciled = data['form'].get('reconciled', False)
111 self.result_selection = data['form'].get('result_selection', 'customer_supplier')
112 self.target_move = data['form'].get('target_move', 'all')
113 self.period_id = data['form'].get('period_from', False)
114 self.date_from = data['form'].get('date_from', False)
115 self.instance_ids = data['form'].get('instance_ids', False)
116 self.account_ids = data['form'].get('account_ids', False)
117 self.display_employee = data['form'].get('display_employee', '')
118 self.fiscalyear_id = data['form'].get('fiscalyear_id', False)
119 self.employee_type = data['form'].get('employee_type', '')
120 self.payment_method = data['form'].get('payment_method', '')
121 if self.fiscalyear_id:
122 fy = obj_fy.read(self.cr, self.uid, [self.fiscalyear_id], ['date_start'], context=used_context)
123 else:
124 # by default all FY taken into account
125 used_context.update({'all_fiscalyear': True})
126 self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=used_context)
127
128 #+ To have right employee balance, we have to take all next lines after a specific date.
129 #+ To do that, we need to make requests regarding a date. So first we take date_from
130 #+ then period_from (if no date_from)
131 #+ finally fisalyear_id (if no period)
132 #+ If no date, the report is wrong.
133 pool = pooler.get_pool(self.cr.dbname)
134 self.DATE_FROM = ''
135 if self.fiscalyear_id or self.period_id or self.date_from:
136 if self.date_from:
137 self.DATE_FROM = "AND l.date >= '%s'" % self.date_from
138 elif self.period_id:
139 period_obj = pool.get('account.period')
140 period = period_obj.read(self.cr, self.uid, [self.period_id], ['date_start'])
141 self.DATE_FROM = "AND l.date >= '%s'" % period[0].get('date_start')
142 elif self.fiscalyear_id:
143 self.DATE_FROM = "AND l.date >= '%s'" % fy[0].get('date_start')
144
145
146 # Create the part of the request concerning instances
147 if not self.instance_ids:
148 # select all instances by default
149 self.instance_ids = self.pool.get('msf.instance').search(self.cr, self.uid, [], order='NO_ORDER')
150 if len(self.instance_ids) == 1:
151 self.INSTANCE_REQUEST = "AND l.instance_id = %s" % self.instance_ids[0]
152 else:
153 self.INSTANCE_REQUEST = "AND l.instance_id IN %s" % (tuple(self.instance_ids),)
154
155 if self.result_selection == 'supplier':
156 self.ACCOUNT_TYPE = ['payable']
157 elif self.result_selection == 'customer':
158 self.ACCOUNT_TYPE = ['receivable']
159 else:
160 self.ACCOUNT_TYPE = ['payable','receivable']
161
162 # get the account list (if some accounts have been specifically selected use them directly)
163 if not self.account_ids:
164 self.cr.execute(
165 "SELECT a.id "
166 "FROM account_account a "
167 "LEFT JOIN account_account_type t "
168 "ON (a.user_type=t.id) "
169 'WHERE a.type IN %s'
170 " " + "AND a.active", (tuple(self.ACCOUNT_TYPE), ))
171 self.account_ids = [a for (a,) in self.cr.fetchall()]
172 if data['form'].get('employee_ids', False):
173 new_ids = data['form']['employee_ids'] # some employees are specifically selected
174 else:
175 employee_to_use = []
176 pay_method_request = ''
177 emp_request = ''
178 active_selection = "IN ('t','f')"
179 # check if we should display all employees or only active ones
180 if data['form'].get('only_active_employees'):
181 active_selection = "= 't'"
182 # check if we should include only a selected type of employees
183 emp_type = data['form'].get('employee_type', '')
184 if emp_type != '':
185 emp_request += "AND emp.employee_type = '%s' " % emp_type.encode("utf-8")
186 # check if we should include only employees using a selected method of payment
187 pay_method = data['form'].get('payment_method')
188 if pay_method != 'blank':
189 emp_request += "AND pay.name = '%s' " % pay_method.encode("utf-8")
190 # do join with payment_method only when local staff is selected because exp staff don't always have payment method registered
191 if emp_type == 'local':
192 pay_method_request = "JOIN hr_payment_method pay ON (emp.payment_method_id = pay.id) "
193 emp_query = """SELECT emp.id as employee_id, emp.name_resource
194 FROM hr_employee emp
195 INNER JOIN resource_resource res ON emp.resource_id = res.id %s
196 WHERE res.active %s %s
197 ORDER BY emp.name_resource;""" % (pay_method_request, active_selection, emp_request,)
198 self.cr.execute(emp_query)
199 res = self.cr.dictfetchall()
200 for res_line in res:
201 employee_to_use.append(res_line['employee_id'])
202 new_ids = employee_to_use
203 self.employee_ids = new_ids
204 objects = obj_employee.browse(self.cr, self.uid, new_ids)
205 res = super(employee_ledger, self).set_context(objects, data, new_ids, report_type)
206 common_report_header._set_context(self, data)
207 if data['model'] == 'ir.ui.menu':
208 # US-324: use of user LG instead of each employee in the report
209 lang_dict = self.pool.get('res.users').read(self.cr,self.uid,self.uid,['context_lang'])
210 data['lang'] = lang_dict.get('context_lang') or False
211
212 return res
213
214 def comma_me(self, amount):
215 if type(amount) is float:
216 amount = str('%.2f'%amount)
217 else:
218 amount = str(amount)
219 if (amount == '0'):
220 return ' '
221 orig = amount
222 new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount)
223 if orig == new:
224 return new
225 else:
226 return self.comma_me(new)
227
228 def _format_entry_label(self, label, index):
229 """
230 Formats the entry label:
231 adds a line break every (index) character
232 """
233 x = 0
234 parts = []
235 while x < len(label):
236 parts.append(label[x:x+index])
237 x += index
238 return "\n".join(parts)
239
240 def _get_accounts_to_display(self, employee):
241 """
242 Returns the list of account codes to be displayed for the employee in parameter
243 """
244 if self.accounts_to_display:
245 return self.accounts_to_display.get(employee.id, [])
246 move_state = ['draft', 'posted']
247 if self.target_move == 'posted':
248 move_state = ['posted']
249 if self.reconciled == 'yes':
250 reconcile_tag = "AND l.reconcile_id IS NOT NULL"
251 elif self.reconciled == 'no':
252 reconcile_tag = "AND l.reconcile_id IS NULL AND acc.reconcile='t'" # reconcilable entries not reconciled
253 else: # 'empty'
254 reconcile_tag = " "
255 self.cr.execute(
256 "SELECT l.employee_id, acc.code "
257 "FROM account_move_line l "
258 "LEFT JOIN account_journal j ON l.journal_id = j.id "
259 "LEFT JOIN account_account acc ON l.account_id = acc.id "
260 "LEFT JOIN res_currency c ON l.currency_id = c.id "
261 "LEFT JOIN account_move m ON m.id = l.move_id "
262 "WHERE "
263 " l.account_id IN %s AND " + self.query + " "
264 "AND m.state IN %s "
265 " " + reconcile_tag + " "
266 " " + self.DATE_FROM + " "
267 " " + self.INSTANCE_REQUEST + " "
268 "GROUP BY l.employee_id, acc.code ORDER BY acc.code;",
269 (tuple(self.account_ids), tuple(move_state)))
270 for x in self.cr.fetchall():
271 self.accounts_to_display.setdefault(x[0], []).append(x[1])
272 return self.accounts_to_display.get(employee.id, [])
273
274 def lines(self, employee, account_code):
275 if employee.id in self.report_lines and account_code in self.report_lines[employee.id]:
276 return self.report_lines[employee.id][account_code]
277 move_state = ['draft','posted']
278 if self.target_move == 'posted':
279 move_state = ['posted']
280
281 if self.reconciled == 'yes':
282 RECONCILE_TAG = "AND l.reconcile_id IS NOT NULL"
283 elif self.reconciled == 'no':
284 RECONCILE_TAG = "AND l.reconcile_id IS NULL AND acc.reconcile='t'" # reconcilable entries not reconciled
285 else: # 'empty'
286 RECONCILE_TAG = " "
287 self.cr.execute(
288 "SELECT l.id, l.date, j.code, acc.code as a_code, acc.name as a_name, l.ref, m.name as move_name, l.name, "
289 "COALESCE(l.debit_currency, 0) as debit, COALESCE(l.credit_currency, 0) as credit, "
290 "COALESCE(l.debit, 0) AS debit_functional, COALESCE(l.credit, 0) AS credit_functional, "
291 "l.debit - l.credit as total_functional, l.amount_currency, l.currency_id, c.name AS currency_code, "
292 "l.reconcile_txt "
293 "FROM account_move_line l " \
294 "LEFT JOIN account_journal j " \
295 "ON (l.journal_id = j.id) " \
296 "LEFT JOIN account_account acc " \
297 "ON (l.account_id = acc.id) " \
298 "LEFT JOIN res_currency c ON (l.currency_id=c.id)" \
299 "LEFT JOIN account_move m ON (m.id=l.move_id)" \
300 "WHERE l.employee_id = %s " \
301 "AND l.account_id = (SELECT id FROM account_account WHERE code = %s LIMIT 1) "
302 "AND " + self.query + " " \
303 "AND m.state IN %s " \
304 " " + RECONCILE_TAG + " "\
305 " " + self.DATE_FROM + " "\
306 " " + self.INSTANCE_REQUEST + " "
307 "ORDER BY l.date;",
308 (employee.id, account_code, tuple(move_state)))
309 if employee.id not in self.report_lines:
310 self.report_lines[employee.id] = {}
311 self.report_lines[employee.id][account_code] = self.cr.dictfetchall()
312 # initialize totals in functional currency
313 if employee.id not in self.fctal_totals:
314 self.fctal_totals[employee.id] = {}
315 if account_code not in self.fctal_totals[employee.id]:
316 self.fctal_totals[employee.id][account_code] = {
317 'debit_functional': 0.0,
318 'credit_functional': 0.0,
319 'total_functional': 0.0,
320 }
321 # initialize subtotals in booking currency
322 if employee.id not in self.subtotals:
323 self.subtotals[employee.id] = {}
324 if account_code not in self.subtotals[employee.id]:
325 self.subtotals[employee.id][account_code] = {}
326 # fill in fctal_totals/subtotals
327 for line in self.report_lines[employee.id][account_code]:
328 self.fctal_totals[employee.id][account_code]['debit_functional'] += line['debit_functional'] or 0.0
329 self.fctal_totals[employee.id][account_code]['credit_functional'] += line['credit_functional'] or 0.0
330 self.fctal_totals[employee.id][account_code]['total_functional'] += line['total_functional'] or 0.0
331 if line['currency_code'] not in self.subtotals[employee.id][account_code]:
332 self.subtotals[employee.id][account_code][line['currency_code']] = {
333 'debit': 0.0,
334 'credit': 0.0,
335 'amount_currency': 0.0,
336 'total_functional': 0.0,
337 }
338 self.subtotals[employee.id][account_code][line['currency_code']]['debit'] += line['debit'] or 0.0
339 self.subtotals[employee.id][account_code][line['currency_code']]['credit'] += line['credit'] or 0.0
340 self.subtotals[employee.id][account_code][line['currency_code']]['amount_currency'] += line['amount_currency'] or 0.0
341 self.subtotals[employee.id][account_code][line['currency_code']]['total_functional'] += line['total_functional'] or 0.0
342 return self.report_lines[employee.id][account_code]
343
344 def _get_subtotals(self, employee, account_code):
345 """
346 Returns a dictionary with key = currency code, and value = dict. of the subtotals values for the
347 employee/account_code, i.e. {'credit': xxx, 'debit': xxx, 'amount_currency': xxx, 'total_functional': xxx}
348 """
349 if employee.id not in self.subtotals or account_code not in self.subtotals[employee.id]:
350 self.lines(employee, account_code) # fills in the self.subtotals dictionary
351 return self.subtotals[employee.id][account_code]
352
353 def _get_fctal_totals(self, employee, account_code):
354 """
355 Returns a dictionary with the total values in functional currency for the employee/code in param:
356 {'credit_functional': xxx, 'debit_functional': xxx, 'total_functional': xxx}
357 """
358 if employee.id not in self.fctal_totals or account_code not in self.fctal_totals[employee.id]:
359 self.lines(employee, account_code) # fills in the self.fctal_totals dictionary
360 return self.fctal_totals[employee.id][account_code]
361
362 def _update_current_employee_number(self):
363 """
364 Increments the current employee number and always returns True (used for the display in rml template)
365 """
366 self.current_employee_number += 1
367 return True
368
369 def _sum_debit_employee(self, employee):
370 if employee.id in self.debit_balances:
371 # compute the result only once per employee
372 return self.debit_balances[employee.id]
373 move_state = ['draft','posted']
374 if self.target_move == 'posted':
375 move_state = ['posted']
376
377 result_tmp = 0.0
378 if self.reconciled == 'yes':
379 RECONCILE_TAG = "AND l.reconcile_id IS NOT NULL"
380 elif self.reconciled == 'no':
381 RECONCILE_TAG = "AND l.reconcile_id IS NULL AND acc.reconcile='t'" # reconcilable entries not reconciled
382 else: # 'empty'
383 RECONCILE_TAG = " "
384
385 self.cr.execute(
386 "SELECT sum(debit) " \
387 "FROM account_move_line AS l, " \
388 "account_move AS m, "
389 "account_account AS acc "
390 "WHERE l.employee_id = %s " \
391 "AND m.id = l.move_id " \
392 "AND l.account_id = acc.id "
393 "AND m.state IN %s "
394 "AND account_id IN %s" \
395 " " + RECONCILE_TAG + " " \
396 " " + self.DATE_FROM + " " \
397 " " + self.INSTANCE_REQUEST + " "
398 "AND " + self.query + " ",
399 (employee.id, tuple(move_state), tuple(self.account_ids),))
400
401 contemp = self.cr.fetchone()
402 if contemp != None:
403 result_tmp = contemp[0] or 0.0
404 else:
405 result_tmp = result_tmp + 0.0
406 self.debit_balances[employee.id] = result_tmp
407 return result_tmp
408
409 def _sum_credit_employee(self, employee):
410 if employee.id in self.credit_balances:
411 # compute the result only once per employee
412 return self.credit_balances[employee.id]
413 move_state = ['draft','posted']
414 if self.target_move == 'posted':
415 move_state = ['posted']
416
417 result_tmp = 0.0
418 if self.reconciled == 'yes':
419 RECONCILE_TAG = "AND l.reconcile_id IS NOT NULL"
420 elif self.reconciled == 'no':
421 RECONCILE_TAG = "AND l.reconcile_id IS NULL AND acc.reconcile='t'" # reconcilable entries not reconciled
422 else: # 'empty'
423 RECONCILE_TAG = " "
424
425 self.cr.execute(
426 "SELECT sum(credit) " \
427 "FROM account_move_line AS l, " \
428 "account_move AS m, "
429 "account_account AS acc "
430 "WHERE l.employee_id=%s " \
431 "AND m.id = l.move_id " \
432 "AND l.account_id = acc.id "
433 "AND m.state IN %s "
434 "AND account_id IN %s" \
435 " " + RECONCILE_TAG + " " \
436 " " + self.DATE_FROM + " " \
437 " " + self.INSTANCE_REQUEST + " "\
438 "AND " + self.query + " ",
439 (employee.id, tuple(move_state), tuple(self.account_ids),))
440
441 contemp = self.cr.fetchone()
442 if contemp != None:
443 result_tmp = contemp[0] or 0.0
444 else:
445 result_tmp = result_tmp + 0.0
446 self.credit_balances[employee.id] = result_tmp
447 return result_tmp
448
449 def _employees_to_display(self, employees):
450 """
451 Returns the employees to be displayed in the report as a list of hr.employee browse records
452 """
453 to_display = employees
454 if self.display_employee == 'non-zero_balance':
455 for p in employees:
456 # fill in the dictionaries self.debit_balances and self.credit_balances
457 self._sum_debit_employee(p)
458 self._sum_credit_employee(p)
459 to_display = [p for p in employees if abs(self.debit_balances[p.id] - self.credit_balances[p.id]) > 10**-3]
460 elif self.display_employee == 'with_movements':
461 for p in employees:
462 for account_code in self._get_accounts_to_display(p):
463 # fill in the dictionary self.report_lines
464 self.lines(p, account_code)
465 to_display = [p for p in employees if p.id in self.report_lines and self.report_lines[p.id]]
466 return to_display
467
468 def _get_employees(self):
469 if self.result_selection == 'customer':
470 return _('Receivable Accounts')
471 elif self.result_selection == 'supplier':
472 return _('Payable Accounts')
473 elif self.result_selection == 'customer_supplier':
474 return _('Receivable and Payable Accounts')
475 return ''
476
477 def _get_reconcile_selection(self):
478 """
479 Returns "Yes" if "Reconciled: Yes" is selected in the wizard
480 """
481 selection = _('All')
482 if self.reconciled == 'yes':
483 selection = _('Yes')
484 elif self.reconciled == 'no':
485 selection = _('No')
486 return selection
487
488 def _get_display_employees_selection(self):
489 """
490 Returns the String to display in the "Display Employees" section of the report header
491 """
492 selection = '-'
493 if self.display_employee == 'all':
494 selection = _('All Employees')
495 elif self.display_employee == 'with_movements':
496 selection = _('With movements')
497 elif self.display_employee == 'non-zero_balance':
498 selection = _('With balance is not equal to 0')
499 return selection
500
501 def _sum_currency_amount_account(self, account, form):
502 self._set_get_account_currency_code(account.id)
503 self.cr.execute("SELECT sum(aml.amount_currency) FROM account_move_line as aml,res_currency as rc WHERE aml.currency_id = rc.id AND aml.account_id= %s ", (account.id,))
504 total = self.cr.fetchone()
505 if self.account_currency:
506 return_field = str(total[0]) + self.account_currency
507 return return_field
508 else:
509 currency_total = self.tot_currency = 0.0
510 return currency_total
511
512 def _get_journal(self, data, instance_ids=False):
513 """
514 If all journals have been selected: display "All Journals" instead of listing all of them
515 """
516 journal_ids = data.get('form', False) and data['form'].get('journal_ids', False)
517 if journal_ids:
518 journal_obj = pooler.get_pool(self.cr.dbname).get('account.journal')
519 nb_journals = journal_obj.search(self.cr, self.uid, [], order='NO_ORDER', count=True, context=data.get('context', {}))
520 if len(journal_ids) == nb_journals:
521 return [_('All Journals')]
522 instance_ids = instance_ids or data.get('form', False) and data['form'].get('instance_ids', False)
523 journal_list = super(employee_ledger, self)._get_journal(data, instance_ids)
524 return set(journal_list) # exclude duplications
525
526 def _get_journals_str(self, data):
527 """
528 Returns the list of journals as a String (cut if > 300 characters)
529 """
530 data_tools_obj = self.pool.get('data.tools')
531 return data_tools_obj.truncate_list(self._get_journal(data))
532
533 def _get_instances_str(self, data):
534 """
535 Returns the list of instances as a String (cut if > 300 characters)
536 """
537 data_tools_obj = self.pool.get('data.tools')
538 return data_tools_obj.truncate_list(self._get_instances_from_data(data))
539
540 def _get_accounts_str(self, data):
541 """
542 Returns the list of accounts as a String (cut if > 300 characters)
543 """
544 data_tools_obj = self.pool.get('data.tools')
545 return data_tools_obj.truncate_list(self._get_accounts(data))
546
547# PDF report with one employee per page
548report_sxw.report_sxw('report.account.employee_ledger', 'hr.employee',
549 'addons/account/report/account_employee_ledger.rml',parser=employee_ledger,
550 header='internal landscape')
551# PDF report with employees displayed one after another
552report_sxw.report_sxw('report.account.employee_ledger_other', 'hr.employee',
553 'addons/account/report/account_employee_ledger_other.rml',parser=employee_ledger,
554 header='internal landscape')
555# XLS report
556SpreadsheetReport('report.account.employee_ledger_xls', 'hr.employee',
557 'addons/account/report/account_employee_ledger.mako', parser=employee_ledger)
558# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
0\ No newline at end of file559\ No newline at end of file
1560
=== added file 'bin/addons/account/report/account_employee_ledger.rml'
--- bin/addons/account/report/account_employee_ledger.rml 1970-01-01 00:00:00 +0000
+++ bin/addons/account/report/account_employee_ledger.rml 2022-06-01 15:15:45 +0000
@@ -0,0 +1,777 @@
1<?xml version="1.0"?>
2<document filename="Employee Ledger.pdf">
3 <template pageSize="(842.0,595.0)" title="Employee Ledger" author="Tempo Consulting" allowSplitting="20">
4 <pageTemplate id="first">
5 <frame id="first" x1="28.0" y1="57.0" width="772" height="481"/>
6 </pageTemplate>
7 </template>
8 <stylesheet>
9 <blockTableStyle id="Standard_Outline">
10 <blockAlignment value="LEFT"/>
11 <blockValign value="TOP"/>
12 </blockTableStyle>
13 <blockTableStyle id="Table1">
14 <blockAlignment value="LEFT"/>
15 <blockValign value="TOP"/>
16 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
17 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
18 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
19 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
20 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
21 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
22 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
23 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
24 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
25 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
26 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
27 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
28 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
29 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
30 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
31 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="5,0" stop="5,-1"/>
32 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="5,0" stop="5,-1"/>
33 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="5,0" stop="5,0"/>
34 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
35 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="6,0" stop="6,-1"/>
36 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="6,0" stop="6,0"/>
37 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="7,0" stop="7,0"/>
38 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="7,0" stop="7,-1"/>
39 </blockTableStyle>
40 <blockTableStyle id="Table4">
41 <blockAlignment value="LEFT"/>
42 <blockValign value="TOP"/>
43 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
44 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
45 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
46 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
47 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
48 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
49 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
50 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
51 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
52 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
53 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
54 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
55 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
56 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
57 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
58 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="5,0" stop="5,-1"/>
59 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="5,0" stop="5,-1"/>
60 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="5,0" stop="5,0"/>
61 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
62 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="6,0" stop="6,-1"/>
63 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="6,0" stop="6,0"/>
64 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
65 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="7,0" stop="7,-1"/>
66 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="7,0" stop="7,-1"/>
67 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="7,0" stop="7,0"/>
68 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
69 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="8,0" stop="8,-1"/>
70 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="8,0" stop="8,0"/>
71 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="8,-1" stop="8,-1"/>
72 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="9,0" stop="9,-1"/>
73 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="9,0" stop="9,-1"/>
74 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="9,0" stop="9,0"/>
75 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="9,-1" stop="9,-1"/>
76 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="10,0" stop="10,-1"/>
77 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="10,0" stop="10,0"/>
78 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="10,-1" stop="10,-1"/>
79 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="11,0" stop="11,-1"/>
80 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="11,0" stop="11,-1"/>
81 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="11,0" stop="11,0"/>
82 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="11,-1" stop="11,-1"/>
83 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="12,0" stop="12,-1"/>
84 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="12,0" stop="12,0"/>
85 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="12,-1" stop="12,-1"/>
86 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="13,0" stop="13,-1"/>
87 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="13,0" stop="13,-1"/>
88 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="13,0" stop="13,0"/>
89 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="13,-1" stop="13,-1"/>
90 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,1" stop="0,-1"/>
91 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,1" stop="0,1"/>
92 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
93 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,1" stop="1,-1"/>
94 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,1" stop="1,-1"/>
95 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,1" stop="1,1"/>
96 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
97 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,2" stop="0,-1"/>
98 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,2" stop="0,2"/>
99 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
100 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,2" stop="1,-1"/>
101 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,2" stop="1,-1"/>
102 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,2" stop="1,2"/>
103 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
104 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,3" stop="0,-1"/>
105 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,3" stop="0,3"/>
106 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
107 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,3" stop="1,-1"/>
108 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,3" stop="1,-1"/>
109 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,3" stop="1,3"/>
110 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
111 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,4" stop="0,-1"/>
112 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,4" stop="0,4"/>
113 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
114 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,4" stop="1,-1"/>
115 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,4" stop="1,-1"/>
116 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,4" stop="1,4"/>
117 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
118 </blockTableStyle>
119 <blockTableStyle id="Table7">
120 <blockAlignment value="LEFT"/>
121 <blockValign value="TOP"/>
122 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
123 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
124 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
125 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
126 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
127 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
128 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
129 </blockTableStyle>
130 <blockTableStyle id="Table9">
131 <blockAlignment value="LEFT"/>
132 <blockValign value="TOP"/>
133 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
134 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
135 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
136 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
137 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
138 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
139 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
140 </blockTableStyle>
141 <blockTableStyle id="Table10">
142 <blockAlignment value="LEFT"/>
143 <blockValign value="TOP"/>
144 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
145 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
146 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
147 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
148 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
149 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
150 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
151 </blockTableStyle>
152 <blockTableStyle id="Table11">
153 <blockAlignment value="LEFT"/>
154 <blockValign value="TOP"/>
155 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
156 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
157 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
158 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
159 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
160 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
161 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
162 </blockTableStyle>
163 <blockTableStyle id="Table2">
164 <blockAlignment value="LEFT"/>
165 <blockValign value="TOP"/>
166 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
167 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
168 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
169 <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
170 <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
171 <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
172 <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
173 <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
174 <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/>
175 <lineStyle kind="LINEBELOW" colorName="#000000" start="9,-1" stop="9,-1"/>
176 <lineStyle kind="LINEBELOW" colorName="#000000" start="10,-1" stop="10,-1"/>
177 </blockTableStyle>
178 <blockTableStyle id="Table3">
179 <blockAlignment value="LEFT"/>
180 <blockValign value="TOP"/>
181 <lineStyle kind="LINEBELOW" colorName="#999999" start="0,-1" stop="0,-1"/>
182 </blockTableStyle>
183 <blockTableStyle id="Table5">
184 <blockAlignment value="LEFT"/>
185 <blockValign value="TOP"/>
186 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
187 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
188 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
189 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
190 </blockTableStyle>
191 <blockTableStyle id="Table6">
192 <blockAlignment value="LEFT"/>
193 <blockValign value="TOP"/>
194 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
195 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
196 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
197 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
198 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
199 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
200 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
201 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
202 </blockTableStyle>
203 <blockTableStyle id="Table8">
204 <blockAlignment value="LEFT"/>
205 <blockValign value="TOP"/>
206 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
207 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
208 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
209 <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
210 <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
211 <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
212 <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
213 <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
214 <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/>
215 </blockTableStyle>
216 <blockTableStyle id="Table12">
217 <blockAlignment value="LEFT"/>
218 <blockValign value="TOP"/>
219 <lineStyle kind="LINEBELOW" colorName="#999999" start="0,-1" stop="0,-1"/>
220 </blockTableStyle>
221 <blockTableStyle id="Table13">
222 <blockAlignment value="LEFT"/>
223 <blockValign value="TOP"/>
224 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
225 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
226 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
227 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
228 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
229 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
230 </blockTableStyle>
231 <blockTableStyle id="Table14">
232 <blockAlignment value="LEFT"/>
233 <blockValign value="TOP"/>
234 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
235 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
236 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
237 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
238 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
239 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
240 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
241 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
242 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="8,-1" stop="8,-1"/>
243 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="9,-1" stop="9,-1"/>
244 </blockTableStyle>
245 <initialize>
246 <paraStyle name="all" alignment="justify"/>
247 </initialize>
248 <paraStyle name="P1" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
249 <paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
250 <paraStyle name="P3" fontName="Helvetica" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
251 <paraStyle name="P4" fontName="Helvetica" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
252 <paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
253 <paraStyle name="P6" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
254 <paraStyle name="P7" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
255 <paraStyle name="P8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
256 <paraStyle name="P9" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
257 <paraStyle name="PRightBold" fontName="Helvetica-Bold" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
258 <paraStyle name="PCenteredBold" fontName="Helvetica-Bold" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
259 <paraStyle name="Standard" fontName="Helvetica"/>
260 <paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
261 <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
262 <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
263 <paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" spaceBefore="6.0" spaceAfter="6.0"/>
264 <paraStyle name="Index" fontName="Helvetica" fontSize="9.0" leading="11"/>
265 <paraStyle name="Footer" fontName="Helvetica"/>
266 <paraStyle name="Table Contents" fontName="Helvetica"/>
267 <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
268 <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
269 <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
270 <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
271 <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
272 <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
273 <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
274 <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
275 <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
276 <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
277 <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
278 <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
279 <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
280 <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
281 <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
282 <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
283 <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
284 <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
285 <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
286 <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
287 <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
288 <paraStyle name="terp_default_9_italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
289 <paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
290 <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
291 <paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
292 <images/>
293 </stylesheet>
294 <story>
295 <para style="terp_default_8">[[ setLang(data['lang']) ]]</para>
296 <section>
297 <para style="terp_default_8">[[ repeatIn(employees_to_display(objects), 'p') ]]</para>
298 <para style="terp_default_8">
299 <font color="white"> </font>
300 </para>
301 <!-- update the number of the current employee displayed -->
302 <para style="terp_header_Centre">[[ update_current_employee_number() and translate('Employee Ledger') ]]</para>
303 <para style="terp_default_8">
304 <font color="white"> </font>
305 </para>
306 <!-- NOTE: if this HEADER has to be modified: modify also the "no data" version (below) and the "employees
307 displayed one after another" version -->
308 <blockTable colWidths="65.0,40.0,125.0,85.0,85.0,167.0,165.0,45.0" style="Table1">
309 <tr>
310 <td>
311 <para style="terp_tblheader_General_Centre">Chart of Account</para>
312 </td>
313 <td>
314 <para style="terp_tblheader_General_Centre">Fiscal Year</para>
315 </td>
316 <td>
317 <para style="terp_tblheader_General_Centre">Journals</para>
318 </td>
319 <td>
320 <para style="terp_tblheader_General_Centre">Accounts</para>
321 </td>
322 <td>
323 <para style="terp_tblheader_General_Centre">Proprietary Instances</para>
324 </td>
325 <td>
326 <para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!=translate('No Filter') and get_filter(data) ]]</para>
327 </td>
328 <td>
329 <para style="terp_tblheader_General_Centre">Display</para>
330 </td>
331 <td>
332 <para style="terp_tblheader_General_Centre">Func. Currency</para>
333 </td>
334 </tr>
335 </blockTable>
336 <blockTable colWidths="65.0,40.0,125.0,85.0,85.0,167.0,165.0,45.0" style="Table4">
337 <tr>
338 <td>
339 <para style="terp_default_Centre_8">[[ get_account(data) or '' ]]</para>
340 </td>
341 <td>
342 <para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para>
343 </td>
344 <td>
345 <para style="terp_default_Centre_8">[[ get_journals_str(data) ]]</para>
346 </td>
347 <td>
348 <para style="terp_default_Centre_8">[[ get_accounts_str(data) ]]</para>
349 </td>
350 <td>
351 <para style="terp_default_Centre_8">[[ get_instances_str(data) ]]</para>
352 </td>
353 <td>
354 <para style="terp_default_Centre_8">[[ get_filter(data)==translate('No Filter') and get_filter(data) or removeParentNode('para') ]]</para>
355 <blockTable colWidths="79.0,79.0" style="Table7">
356 <tr>
357 <td>
358 <para style="terp_tblheader_General_Centre">[[ get_filter(data)==translate('Date') and translate('Start Date') or removeParentNode('blockTable') ]]</para>
359 </td>
360 <td>
361 <para style="terp_tblheader_General_Centre">End Date</para>
362 </td>
363 </tr>
364 </blockTable>
365 <blockTable colWidths="79.0,79.0" style="Table9">
366 <tr>
367 <td>
368 <para style="terp_default_Centre_8">[[ get_filter(data)==translate('Date') and ' ' or removeParentNode('blockTable') ]] [[ formatLang(get_start_date(data),date=True) ]]</para>
369 </td>
370 <td>
371 <para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</para>
372 </td>
373 </tr>
374 </blockTable>
375 <blockTable colWidths="79.0,79.0" style="Table10">
376 <tr>
377 <td>
378 <para style="terp_tblheader_General_Centre">[[ get_filter(data)==translate('Periods') and translate('Start Period') or removeParentNode('blockTable') ]]</para>
379 </td>
380 <td>
381 <para style="terp_tblheader_General_Centre">End Period</para>
382 </td>
383 </tr>
384 </blockTable>
385 <blockTable colWidths="79.0,79.0" style="Table11">
386 <tr>
387 <td>
388 <para style="terp_default_Centre_8">[[ get_filter(data)==translate('Periods') and ' ' or removeParentNode('blockTable') ]] [[ get_start_period(data) or removeParentNode('para') ]]</para>
389 </td>
390 <td>
391 <para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para>
392 </td>
393 </tr>
394 </blockTable>
395 <para style="terp_default_8">
396 <font color="white"> </font>
397 </para>
398 </td>
399 <td>
400 <para style="terp_default_Centre_8">[[ "%s: %s, %s: %s, %s: %s, %s: %s, %s: %s, %s: %s" % (translate("Employee's"), get_employees(), translate('Target Moves'), get_target_move(data), translate('Reconciled'), get_reconcile_selection(), translate('Display Employees'), get_display_employees_selection(), translate('Employee Type'), get_employee_type(data),translate('Payment Method'), get_payment_methods(data)) ]]</para>
401 </td>
402 <td>
403 <para style="terp_default_Centre_8">[[ company.currency_id.name ]]</para>
404 </td>
405 </tr>
406 </blockTable>
407 <para style="terp_default_8">
408 <font color="white"> </font>
409 </para>
410 <para style="terp_default_8">
411 <font color="white"> </font>
412 </para>
413 <section>
414 <blockTable colWidths="72.0,25.0,101.0,46.0,104.0,60.0,51.0,67.0,67.0,77.0,89.0" style="Table2">
415 <tr>
416 <td>
417 <para style="terp_tblheader_Details">Date</para>
418 </td>
419 <td>
420 <para style="terp_tblheader_Details">JRNL</para>
421 </td>
422 <td>
423 <para style="terp_tblheader_Details_Centre">Entry Sequence</para>
424 </td>
425 <td>
426 <para style="terp_tblheader_Details_Centre">Account</para>
427 </td>
428 <td>
429 <para style="terp_tblheader_Details_Centre">Entry Label</para>
430 </td>
431 <td>
432 <para style="terp_tblheader_Details">Reconcile Number</para>
433 </td>
434 <td>
435 <para style="terp_tblheader_Details">Currency</para>
436 </td>
437 <td>
438 <para style="terp_tblheader_Details_Centre">Debit</para>
439 </td>
440 <td>
441 <para style="terp_tblheader_Details_Centre">Credit</para>
442 </td>
443 <td>
444 <para style="terp_tblheader_Details_Right">Booking Balance</para>
445 </td>
446 <td>
447 <para style="terp_tblheader_Details_Right">Balance [[ company.currency_id.name ]]</para>
448 </td>
449 </tr>
450 </blockTable>
451 <blockTable colWidths="370.0,40.0,80.0,80.0,90.0,102.0" style="Table8">
452 <tr>
453 <td>
454 <para style="terp_tblheader_Details">
455 <font color="white"> </font>
456 </para>
457 </td>
458 <td>
459 <para style="terp_tblheader_Details">
460 <font color="white"> </font>
461 </para>
462 </td>
463 <td>
464 <para style="terp_tblheader_Details_Centre">
465 <font color="white"> </font>
466 </para>
467 </td>
468 <td>
469 <para style="terp_tblheader_Details_Centre">
470 <font color="white"> </font>
471 </para>
472 </td>
473 <td>
474 <para style="terp_tblheader_Details">
475 <font color="white"> </font>
476 </para>
477 </td>
478 <td>
479 <para style="terp_tblheader_Details_Right">
480 <font color="white"> </font>
481 </para>
482 </td>
483 </tr>
484 </blockTable>
485 <blockTable colWidths="420.0,30.0,70.0,70.0,80.0,92.0" style="Table12">
486 <tr>
487 <td>
488 <para style="terp_default_Bold_9">[[ p.name_resource ]]</para>
489 </td>
490 <td>
491 <para style="terp_default_Bold_9">[[ company.currency_id.name ]]</para>
492 </td>
493 <td>
494 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_employee(p) or 0.0) ]]</para>
495 </td>
496 <td>
497 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_employee(p) or 0.0) ]]</para>
498 </td>
499 <td>
500 <para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_employee(p) or 0.0) - (sum_credit_employee(p) or 0.0)) ]]</para>
501 </td>
502 <td>
503 <para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_employee(p) or 0.0) - (sum_credit_employee(p) or 0.0)) ]]</para>
504 </td>
505 </tr>
506 </blockTable>
507
508 <section>
509 <para style="terp_default_8">[[ repeatIn(get_accounts_to_display(p), 'account_code') ]]</para>
510 <!-- TOTALS IN FUNCTIONAL -->
511 <section>
512 <blockTable colWidths="296.0,124.0,30.0,70.0,70.0,80.0,92.0" style="Table14">
513 <tr>
514 <td>
515 <para style="PCenteredBold">[[ p.name_resource or '' ]]</para>
516 </td>
517 <td>
518 <para style="PRightBold">[[ account_code ]]</para>
519 </td>
520 <td>
521 <para style="terp_default_Bold_8">[[ company.currency_id.name ]]</para>
522 </td>
523 <td>
524 <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['debit_functional'] or 0.0) ]]</para>
525 </td>
526 <td>
527 <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['credit_functional'] or 0.0) ]]</para>
528 </td>
529 <td>
530 <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['total_functional'] or 0.0) ]]</para>
531 </td>
532 <td>
533 <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['total_functional'] or 0.0) ]]</para>
534 </td>
535 </tr>
536 </blockTable>
537 <para style="terp_default_2">
538 <font color="white"> </font>
539 </para>
540 </section>
541 <!-- SUBTOTAL LINES IN BOOKING -->
542 <section>
543 <para style="terp_default_8">[[ repeatIn(get_subtotals(p, account_code), 'curr') ]]</para>
544 <blockTable colWidths="296.0,124.0,30.0,70.0,70.0,80.0,92.0" style="Table14">
545 <tr>
546 <td>
547 <para style="PCenteredBold">[[ p.name_resource or '' ]]</para>
548 </td>
549 <td>
550 <para style="PRightBold">Subtotal</para>
551 </td>
552 <td>
553 <para style="terp_default_Bold_8">[[ curr or '' ]]</para>
554 </td>
555 <td>
556 <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['debit'] or 0.0) ]]</para>
557 </td>
558 <td>
559 <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['credit'] or 0.0) ]]</para>
560 </td>
561 <td>
562 <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['amount_currency'] or 0.0) ]]</para>
563 </td>
564 <td>
565 <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['total_functional'] or 0.0) ]]</para>
566 </td>
567 </tr>
568 </blockTable>
569 <para style="terp_default_2">
570 <font color="white"> </font>
571 </para>
572 </section>
573 <!-- LINES -->
574 <section>
575 <para style="terp_default_8">[[ repeatIn(lines(p, account_code), 'line') ]]</para>
576 <blockTable colWidths="77.0,25.0,88.0,41.0,139.0,50.0,30.0,70.0,70.0,80.0,92.0" style="Table14">
577 <tr>
578 <td>
579 <para style="P3">[[ formatLang(line['date'], date=True) ]]</para>
580 </td>
581 <td>
582 <para style="P7">[[ line['code'] ]]</para>
583 </td>
584 <td>
585 <para style="P8">[[ line['move_name'] ]]</para>
586 </td>
587 <td>
588 <para style="P7">[[ line['a_code'] ]]</para>
589 </td>
590 <td>
591 <para style="P3">[[ format_entry_label('%s - %s' % (line['ref'] or '', line['name'] or ''), 29) ]]</para>
592 </td>
593 <td>
594 <para style="P3">[[ line['reconcile_txt'] or '' ]]</para>
595 </td>
596 <td>
597 <para style="P3">[[ line['currency_code'] or '' ]]</para>
598 </td>
599 <td>
600 <para style="P7">[[ formatLang(line['debit'] or 0.0) ]]</para>
601 </td>
602 <td>
603 <para style="P7">[[ formatLang(line['credit'] or 0.0) ]]</para>
604 </td>
605 <td>
606 <para style="P7">[[ (line['currency_id'] == None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] or 0.0) ]]</para>
607 </td>
608 <td>
609 <para style="P7">[[ formatLang(line['total_functional'] or 0.0) ]]</para>
610 </td>
611 </tr>
612 </blockTable>
613 <para style="terp_default_2">
614 <font color="white"> </font>
615 </para>
616 </section>
617 </section>
618 <para style="terp_default_2">
619 <font color="white"> </font>
620 </para>
621 </section>
622 <pageBreak>[[ (nb_employees(objects) == 0 or get_current_employee_number() == nb_employees(objects)) and removeParentNode('pageBreak')]]</pageBreak>
623 </section>
624 <section> <!-- if there is NO DATA to be displayed: display the header only -->
625 <para style="terp_default_8">
626 [[ nb_employees(objects) > 0 and removeParentNode('section') ]]
627 <font color="white"> </font>
628 </para>
629 <para style="terp_header_Centre">Employee Ledger</para>
630 <para style="terp_default_8">
631 <font color="white"> </font>
632 </para>
633 <blockTable colWidths="65.0,40.0,125.0,85.0,85.0,167.0,165.0,45.0" style="Table1">
634 <tr>
635 <td>
636 <para style="terp_tblheader_General_Centre">Chart of Account</para>
637 </td>
638 <td>
639 <para style="terp_tblheader_General_Centre">Fiscal Year</para>
640 </td>
641 <td>
642 <para style="terp_tblheader_General_Centre">Journals</para>
643 </td>
644 <td>
645 <para style="terp_tblheader_General_Centre">Accounts</para>
646 </td>
647 <td>
648 <para style="terp_tblheader_General_Centre">Proprietary Instances</para>
649 </td>
650 <td>
651 <para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!=translate('No Filter') and get_filter(data) ]]</para>
652 </td>
653 <td>
654 <para style="terp_tblheader_General_Centre">Display</para>
655 </td>
656 <td>
657 <para style="terp_tblheader_General_Centre">Func. Currency</para>
658 </td>
659 </tr>
660 </blockTable>
661 <blockTable colWidths="65.0,40.0,125.0,85.0,85.0,167.0,165.0,45.0" style="Table4">
662 <tr>
663 <td>
664 <para style="terp_default_Centre_8">[[ get_account(data) or '' ]]</para>
665 </td>
666 <td>
667 <para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para>
668 </td>
669 <td>
670 <para style="terp_default_Centre_8">[[ get_journals_str(data) ]]</para>
671 </td>
672 <td>
673 <para style="terp_default_Centre_8">[[ get_accounts_str(data) ]]</para>
674 </td>
675 <td>
676 <para style="terp_default_Centre_8">[[ get_instances_str(data) ]]</para>
677 </td>
678 <td>
679 <para style="terp_default_Centre_8">[[ get_filter(data)==translate('No Filter') and get_filter(data) or removeParentNode('para') ]]</para>
680 <blockTable colWidths="79.0,79.0" style="Table7">
681 <tr>
682 <td>
683 <para style="terp_tblheader_General_Centre">[[ get_filter(data)==translate('Date') and translate('Start Date') or removeParentNode('blockTable') ]]</para>
684 </td>
685 <td>
686 <para style="terp_tblheader_General_Centre">End Date</para>
687 </td>
688 </tr>
689 </blockTable>
690 <blockTable colWidths="79.0,79.0" style="Table9">
691 <tr>
692 <td>
693 <para style="terp_default_Centre_8">[[ get_filter(data)==translate('Date') and ' ' or removeParentNode('blockTable') ]] [[ formatLang(get_start_date(data),date=True) ]]</para>
694 </td>
695 <td>
696 <para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</para>
697 </td>
698 </tr>
699 </blockTable>
700 <blockTable colWidths="79.0,79.0" style="Table10">
701 <tr>
702 <td>
703 <para style="terp_tblheader_General_Centre">[[ get_filter(data)==translate('Periods') and translate('Start Period') or removeParentNode('blockTable') ]]</para>
704 </td>
705 <td>
706 <para style="terp_tblheader_General_Centre">End Period</para>
707 </td>
708 </tr>
709 </blockTable>
710 <blockTable colWidths="79.0,79.0" style="Table11">
711 <tr>
712 <td>
713 <para style="terp_default_Centre_8">[[ get_filter(data)==translate('Periods') and ' ' or removeParentNode('blockTable') ]] [[ get_start_period(data) or removeParentNode('para') ]]</para>
714 </td>
715 <td>
716 <para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para>
717 </td>
718 </tr>
719 </blockTable>
720 <para style="terp_default_8">
721 <font color="white"> </font>
722 </para>
723 </td>
724 <td>
725 <para style="terp_default_Centre_8">[[ "%s: %s, %s: %s, %s: %s, %s: %s" % (translate("Employee's"), get_employees(), translate('Target Moves'), get_target_move(data), translate('Reconciled'), get_reconcile_selection(), translate('Display Employees'), get_display_employees_selection()) ]]</para>
726 </td>
727 <td>
728 <para style="terp_default_Centre_8">[[ company.currency_id.name ]]</para>
729 </td>
730 </tr>
731 </blockTable>
732 <para style="terp_default_8">
733 <font color="white"> </font>
734 </para>
735 <para style="terp_default_8">
736 <font color="white"> </font>
737 </para>
738 <blockTable colWidths="72.0,25.0,101.0,46.0,104.0,60.0,51.0,67.0,67.0,77.0,89.0" style="Table2">
739 <tr>
740 <td>
741 <para style="terp_tblheader_Details">Date</para>
742 </td>
743 <td>
744 <para style="terp_tblheader_Details">JRNL</para>
745 </td>
746 <td>
747 <para style="terp_tblheader_Details_Centre">Entry Sequence</para>
748 </td>
749 <td>
750 <para style="terp_tblheader_Details_Centre">Account</para>
751 </td>
752 <td>
753 <para style="terp_tblheader_Details_Centre">Entry Label</para>
754 </td>
755 <td>
756 <para style="terp_tblheader_Details">Reconcile Number</para>
757 </td>
758 <td>
759 <para style="terp_tblheader_Details">Currency</para>
760 </td>
761 <td>
762 <para style="terp_tblheader_Details_Centre">Debit</para>
763 </td>
764 <td>
765 <para style="terp_tblheader_Details_Centre">Credit</para>
766 </td>
767 <td>
768 <para style="terp_tblheader_Details_Right">Booking Balance</para>
769 </td>
770 <td>
771 <para style="terp_tblheader_Details_Right">Balance [[ company.currency_id.name ]]</para>
772 </td>
773 </tr>
774 </blockTable>
775 </section>
776 </story>
777</document>
0778
=== added file 'bin/addons/account/report/account_employee_ledger_other.rml'
--- bin/addons/account/report/account_employee_ledger_other.rml 1970-01-01 00:00:00 +0000
+++ bin/addons/account/report/account_employee_ledger_other.rml 2022-06-01 15:15:45 +0000
@@ -0,0 +1,653 @@
1<?xml version="1.0"?>
2<document filename="Employee Ledger.pdf">
3 <template pageSize="(842.0,595.0)" title="Employee Ledger" author="Tempo Consulting" allowSplitting="20">
4 <pageTemplate id="first">
5 <frame id="first" x1="28.0" y1="57.0" width="772" height="481"/>
6 </pageTemplate>
7 </template>
8 <stylesheet>
9 <blockTableStyle id="Standard_Outline">
10 <blockAlignment value="LEFT"/>
11 <blockValign value="TOP"/>
12 </blockTableStyle>
13 <blockTableStyle id="Table1">
14 <blockAlignment value="LEFT"/>
15 <blockValign value="TOP"/>
16 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
17 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
18 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
19 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
20 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
21 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
22 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
23 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
24 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
25 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
26 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
27 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
28 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
29 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
30 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
31 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="5,0" stop="5,-1"/>
32 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="5,0" stop="5,-1"/>
33 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="5,0" stop="5,0"/>
34 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
35 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="6,0" stop="6,-1"/>
36 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="6,0" stop="6,0"/>
37 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="7,0" stop="7,0"/>
38 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="7,0" stop="7,-1"/>
39 </blockTableStyle>
40 <blockTableStyle id="Table4">
41 <blockAlignment value="LEFT"/>
42 <blockValign value="TOP"/>
43 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
44 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
45 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
46 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
47 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
48 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
49 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
50 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
51 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
52 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
53 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
54 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
55 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
56 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
57 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
58 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="5,0" stop="5,-1"/>
59 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="5,0" stop="5,-1"/>
60 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="5,0" stop="5,0"/>
61 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
62 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="6,0" stop="6,-1"/>
63 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="6,0" stop="6,0"/>
64 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
65 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="7,0" stop="7,-1"/>
66 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="7,0" stop="7,-1"/>
67 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="7,0" stop="7,0"/>
68 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
69 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="8,0" stop="8,-1"/>
70 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="8,0" stop="8,0"/>
71 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="8,-1" stop="8,-1"/>
72 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="9,0" stop="9,-1"/>
73 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="9,0" stop="9,-1"/>
74 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="9,0" stop="9,0"/>
75 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="9,-1" stop="9,-1"/>
76 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="10,0" stop="10,-1"/>
77 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="10,0" stop="10,0"/>
78 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="10,-1" stop="10,-1"/>
79 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="11,0" stop="11,-1"/>
80 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="11,0" stop="11,-1"/>
81 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="11,0" stop="11,0"/>
82 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="11,-1" stop="11,-1"/>
83 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="12,0" stop="12,-1"/>
84 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="12,0" stop="12,0"/>
85 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="12,-1" stop="12,-1"/>
86 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="13,0" stop="13,-1"/>
87 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="13,0" stop="13,-1"/>
88 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="13,0" stop="13,0"/>
89 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="13,-1" stop="13,-1"/>
90 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,1" stop="0,-1"/>
91 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,1" stop="0,1"/>
92 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
93 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,1" stop="1,-1"/>
94 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,1" stop="1,-1"/>
95 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,1" stop="1,1"/>
96 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
97 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,2" stop="0,-1"/>
98 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,2" stop="0,2"/>
99 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
100 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,2" stop="1,-1"/>
101 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,2" stop="1,-1"/>
102 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,2" stop="1,2"/>
103 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
104 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,3" stop="0,-1"/>
105 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,3" stop="0,3"/>
106 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
107 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,3" stop="1,-1"/>
108 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,3" stop="1,-1"/>
109 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,3" stop="1,3"/>
110 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
111 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,4" stop="0,-1"/>
112 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,4" stop="0,4"/>
113 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
114 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,4" stop="1,-1"/>
115 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,4" stop="1,-1"/>
116 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,4" stop="1,4"/>
117 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
118 </blockTableStyle>
119 <blockTableStyle id="Table7">
120 <blockAlignment value="LEFT"/>
121 <blockValign value="TOP"/>
122 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
123 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
124 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
125 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
126 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
127 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
128 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
129 </blockTableStyle>
130 <blockTableStyle id="Table9">
131 <blockAlignment value="LEFT"/>
132 <blockValign value="TOP"/>
133 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
134 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
135 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
136 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
137 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
138 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
139 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
140 </blockTableStyle>
141 <blockTableStyle id="Table10">
142 <blockAlignment value="LEFT"/>
143 <blockValign value="TOP"/>
144 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
145 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
146 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
147 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
148 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
149 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
150 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
151 </blockTableStyle>
152 <blockTableStyle id="Table11">
153 <blockAlignment value="LEFT"/>
154 <blockValign value="TOP"/>
155 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
156 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
157 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
158 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
159 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
160 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
161 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
162 </blockTableStyle>
163 <blockTableStyle id="Table15">
164 <blockAlignment value="LEFT"/>
165 <blockValign value="TOP"/>
166 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
167 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
168 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
169 <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
170 <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
171 <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
172 <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
173 <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
174 </blockTableStyle>
175 <blockTableStyle id="Table3">
176 <blockAlignment value="LEFT"/>
177 <blockValign value="TOP"/>
178 <lineStyle kind="LINEBELOW" colorName="#999999" start="0,-1" stop="0,-1"/>
179 </blockTableStyle>
180 <blockTableStyle id="Table5">
181 <blockAlignment value="LEFT"/>
182 <blockValign value="TOP"/>
183 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
184 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
185 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
186 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
187 </blockTableStyle>
188 <blockTableStyle id="Table6">
189 <blockAlignment value="LEFT"/>
190 <blockValign value="TOP"/>
191 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
192 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
193 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
194 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
195 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
196 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
197 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
198 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
199 </blockTableStyle>
200 <blockTableStyle id="Table2">
201 <blockAlignment value="LEFT"/>
202 <blockValign value="TOP"/>
203 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
204 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
205 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
206 <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
207 <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
208 <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
209 <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
210 <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
211 <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/>
212 <lineStyle kind="LINEBELOW" colorName="#000000" start="9,-1" stop="9,-1"/>
213 <lineStyle kind="LINEBELOW" colorName="#000000" start="10,-1" stop="10,-1"/>
214 </blockTableStyle>
215 <blockTableStyle id="Table8">
216 <blockAlignment value="LEFT"/>
217 <blockValign value="TOP"/>
218 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
219 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
220 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
221 <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
222 <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
223 <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
224 <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
225 <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
226 <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/>
227 <lineStyle kind="LINEBELOW" colorName="#000000" start="9,-1" stop="9,-1"/>
228 </blockTableStyle>
229 <blockTableStyle id="Table12">
230 <blockAlignment value="LEFT"/>
231 <blockValign value="TOP"/>
232 <lineStyle kind="LINEBELOW" colorName="#999999" start="0,-1" stop="0,-1"/>
233 </blockTableStyle>
234 <blockTableStyle id="Table13">
235 <blockAlignment value="LEFT"/>
236 <blockValign value="TOP"/>
237 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
238 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
239 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
240 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
241 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
242 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
243 </blockTableStyle>
244 <blockTableStyle id="Table14">
245 <blockAlignment value="LEFT"/>
246 <blockValign value="TOP"/>
247 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
248 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
249 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
250 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
251 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
252 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
253 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
254 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
255 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="8,-1" stop="8,-1"/>
256 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="9,-1" stop="9,-1"/>
257 </blockTableStyle>
258 <initialize>
259 <paraStyle name="all" alignment="justify"/>
260 </initialize>
261 <paraStyle name="P1" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
262 <paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
263 <paraStyle name="P3" fontName="Helvetica" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
264 <paraStyle name="P4" fontName="Helvetica" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
265 <paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
266 <paraStyle name="P6" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
267 <paraStyle name="P7" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
268 <paraStyle name="P8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
269 <paraStyle name="P9" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
270 <paraStyle name="PRightBold" fontName="Helvetica-Bold" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
271 <paraStyle name="PCenteredBold" fontName="Helvetica-Bold" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
272 <paraStyle name="Standard" fontName="Helvetica"/>
273 <paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
274 <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
275 <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
276 <paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" spaceBefore="6.0" spaceAfter="6.0"/>
277 <paraStyle name="Index" fontName="Helvetica" fontSize="9.0" leading="11"/>
278 <paraStyle name="Footer" fontName="Helvetica"/>
279 <paraStyle name="Table Contents" fontName="Helvetica"/>
280 <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
281 <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
282 <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
283 <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
284 <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
285 <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
286 <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
287 <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
288 <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
289 <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
290 <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
291 <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
292 <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
293 <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
294 <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
295 <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
296 <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
297 <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
298 <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
299 <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
300 <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
301 <paraStyle name="terp_default_9_italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
302 <paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
303 <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
304 <paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
305 <images/>
306 </stylesheet>
307 <story>
308 <para style="terp_default_8">
309 <font color="white"> </font>
310 </para>
311 <para style="terp_default_8">[[ setLang(data['lang']) ]]</para>
312 <para style="terp_header_Centre">Employee Ledger</para>
313 <para style="terp_default_8">
314 <font color="white"> </font>
315 </para>
316 <!-- NOTE: if this HEADER has to be modified: modify also the "One employee per page" version -->
317 <blockTable colWidths="65.0,40.0,125.0,85.0,85.0,167.0,165.0,45.0" style="Table1">
318 <tr>
319 <td>
320 <para style="terp_tblheader_General_Centre">Chart of Account</para>
321 </td>
322 <td>
323 <para style="terp_tblheader_General_Centre">Fiscal Year</para>
324 </td>
325 <td>
326 <para style="terp_tblheader_General_Centre">Journals</para>
327 </td>
328 <td>
329 <para style="terp_tblheader_General_Centre">Accounts</para>
330 </td>
331 <td>
332 <para style="terp_tblheader_General_Centre">Proprietary Instances</para>
333 </td>
334 <td>
335 <para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!=translate('No Filter') and get_filter(data) ]]</para>
336 </td>
337 <td>
338 <para style="terp_tblheader_General_Centre">Display</para>
339 </td>
340 <td>
341 <para style="terp_tblheader_General_Centre">Func. Currency</para>
342 </td>
343 </tr>
344 </blockTable>
345 <blockTable colWidths="65.0,40.0,125.0,85.0,85.0,167.0,165.0,45.0" style="Table4">
346 <tr>
347 <td>
348 <para style="terp_default_Centre_8">[[ get_account(data) or '' ]]</para>
349 </td>
350 <td>
351 <para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para>
352 </td>
353 <td>
354 <para style="terp_default_Centre_8">[[ get_journals_str(data) ]]</para>
355 </td>
356 <td>
357 <para style="terp_default_Centre_8">[[ get_accounts_str(data) ]]</para>
358 </td>
359 <td>
360 <para style="terp_default_Centre_8">[[ get_instances_str(data) ]]</para>
361 </td>
362 <td>
363 <para style="terp_default_Centre_8">[[ get_filter(data)==translate('No Filter') and get_filter(data) or removeParentNode('para') ]]</para>
364 <blockTable colWidths="79.0,79.0" style="Table7">
365 <tr>
366 <td>
367 <para style="terp_tblheader_General_Centre">[[ get_filter(data)==translate('Date') and translate('Start Date') or removeParentNode('blockTable') ]]</para>
368 </td>
369 <td>
370 <para style="terp_tblheader_General_Centre">End Date</para>
371 </td>
372 </tr>
373 </blockTable>
374 <blockTable colWidths="79.0,79.0" style="Table9">
375 <tr>
376 <td>
377 <para style="terp_default_Centre_8">[[ get_filter(data)==translate('Date') and ' ' or removeParentNode('blockTable') ]] [[ formatLang(get_start_date(data),date=True) ]]</para>
378 </td>
379 <td>
380 <para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</para>
381 </td>
382 </tr>
383 </blockTable>
384 <blockTable colWidths="79.0,79.0" style="Table10">
385 <tr>
386 <td>
387 <para style="terp_tblheader_General_Centre">[[ get_filter(data)==translate('Periods') and translate('Start Period') or removeParentNode('blockTable') ]]</para>
388 </td>
389 <td>
390 <para style="terp_tblheader_General_Centre">End Period</para>
391 </td>
392 </tr>
393 </blockTable>
394 <blockTable colWidths="79.0,79.0" style="Table11">
395 <tr>
396 <td>
397 <para style="terp_default_Centre_8">[[ get_filter(data)==translate('Periods') and ' ' or removeParentNode('blockTable') ]] [[ get_start_period(data) or removeParentNode('para') ]]</para>
398 </td>
399 <td>
400 <para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para>
401 </td>
402 </tr>
403 </blockTable>
404 <para style="terp_default_8">
405 <font color="white"> </font>
406 </para>
407 </td>
408 <td>
409 <para style="terp_default_Centre_8">[[ "%s: %s, %s: %s, %s: %s, %s: %s, %s: %s, %s: %s" % (translate("Employee's"), get_employees(), translate('Target Moves'), get_target_move(data), translate('Reconciled'), get_reconcile_selection(), translate('Display Employees'), get_display_employees_selection(), translate('Employee Type'), get_employee_type(data),translate('Payment Method'), get_payment_methods(data)) ]]</para>
410 </td>
411 <td>
412 <para style="terp_default_Centre_8">[[ company.currency_id.name ]]</para>
413 </td>
414 </tr>
415 </blockTable>
416 <para style="terp_default_8">
417 <font color="white"> </font>
418 </para>
419 <para style="terp_default_8">
420 <font color="white"> </font>
421 </para>
422 <blockTable colWidths="72.0,25.0,101.0,46.0,104.0,60.0,51.0,67.0,67.0,77.0,89.0" style="Table2">
423 <tr>
424 <td>
425 <para style="terp_tblheader_Details">Date</para>
426 </td>
427 <td>
428 <para style="terp_tblheader_Details">JRNL</para>
429 </td>
430 <td>
431 <para style="terp_tblheader_Details_Centre">Entry Sequence</para>
432 </td>
433 <td>
434 <para style="terp_tblheader_Details_Centre">Account</para>
435 </td>
436 <td>
437 <para style="terp_tblheader_Details_Centre">Entry Label</para>
438 </td>
439 <td>
440 <para style="terp_tblheader_Details">Reconcile Number</para>
441 </td>
442 <td>
443 <para style="terp_tblheader_Details">Currency</para>
444 </td>
445 <td>
446 <para style="terp_tblheader_Details_Centre">Debit</para>
447 </td>
448 <td>
449 <para style="terp_tblheader_Details_Centre">Credit</para>
450 </td>
451 <td>
452 <para style="terp_tblheader_Details_Right">Booking Balance</para>
453 </td>
454 <td>
455 <para style="terp_tblheader_Details_Right">Balance [[ company.currency_id.name ]]</para>
456 </td>
457 </tr>
458 </blockTable>
459 <section>
460 <para style="terp_default_8">[[ repeatIn(employees_to_display(objects), 'p') ]]</para>
461 <blockTable colWidths="59.0,44.0,89.0,89.0,89.0,40.0,80.0,80.0,90.0,102.0" style="Table8">
462 <tr>
463 <td>
464 <para style="terp_tblheader_Details">
465 <font color="white"> </font>
466 </para>
467 </td>
468 <td>
469 <para style="terp_tblheader_Details">
470 <font color="white"> </font>
471 </para>
472 </td>
473 <td>
474 <para style="terp_tblheader_Details_Centre">
475 <font color="white"> </font>
476 </para>
477 </td>
478 <td>
479 <para style="terp_tblheader_Details_Centre">
480 <font color="white"> </font>
481 </para>
482 </td>
483 <td>
484 <para style="terp_tblheader_Details">
485 <font color="white"> </font>
486 </para>
487 </td>
488 <td>
489 <para style="terp_tblheader_Details_Right">
490 <font color="white"> </font>
491 </para>
492 </td>
493 <td>
494 <para style="terp_tblheader_Details_Right">
495 <font color="white"> </font>
496 </para>
497 </td>
498 <td>
499 <para style="terp_tblheader_Details_Right">
500 <font color="white"> </font>
501 </para>
502 </td>
503 <td>
504 <para style="terp_tblheader_Details_Right">
505 <font color="white"> </font>
506 </para>
507 </td>
508 <td>
509 <para style="terp_tblheader_Details_Right">
510 <font color="white"> </font>
511 </para>
512 </td>
513 </tr>
514 </blockTable>
515 <blockTable colWidths="420.0,30.0,70.0,70.0,80.0,92.0" style="Table12">
516 <tr>
517 <td>
518 <para style="terp_default_Bold_9">[[p.name_resource ]]</para>
519 </td>
520 <td>
521 <para style="terp_default_Bold_9">[[ company.currency_id.name ]]</para>
522 </td>
523 <td>
524 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_employee(p) or 0.0) ]]</para>
525 </td>
526 <td>
527 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_employee(p) or 0.0) ]]</para>
528 </td>
529 <td>
530 <para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_employee(p) or 0.0) - (sum_credit_employee(p) or 0.0)) ]]</para>
531 </td>
532 <td>
533 <para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_employee(p) or 0.0) - (sum_credit_employee(p) or 0.0)) ]]</para>
534 </td>
535 </tr>
536 </blockTable>
537
538 <section>
539 <para style="terp_default_8">[[ repeatIn(get_accounts_to_display(p), 'account_code') ]]</para>
540 <!-- TOTALS IN FUNCTIONAL -->
541 <section>
542 <blockTable colWidths="296.0,124.0,30.0,70.0,70.0,80.0,92.0" style="Table14">
543 <tr>
544 <td>
545 <para style="PCenteredBold">[[p.name_resource or '' ]]</para>
546 </td>
547 <td>
548 <para style="PRightBold">[[ account_code ]]</para>
549 </td>
550 <td>
551 <para style="terp_default_Bold_8">[[ company.currency_id.name ]]</para>
552 </td>
553 <td>
554 <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['debit_functional'] or 0.0) ]]</para>
555 </td>
556 <td>
557 <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['credit_functional'] or 0.0) ]]</para>
558 </td>
559 <td>
560 <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['total_functional'] or 0.0) ]]</para>
561 </td>
562 <td>
563 <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['total_functional'] or 0.0) ]]</para>
564 </td>
565 </tr>
566 </blockTable>
567 <para style="terp_default_2">
568 <font color="white"> </font>
569 </para>
570 </section>
571 <!-- SUBTOTAL LINES IN BOOKING -->
572 <section>
573 <para style="terp_default_8">[[ repeatIn(get_subtotals(p, account_code), 'curr') ]]</para>
574 <blockTable colWidths="296.0,124.0,30.0,70.0,70.0,80.0,92.0" style="Table14">
575 <tr>
576 <td>
577 <para style="PCenteredBold">[[p.name_resource or '' ]]</para>
578 </td>
579 <td>
580 <para style="PRightBold">Subtotal</para>
581 </td>
582 <td>
583 <para style="terp_default_Bold_8">[[ curr or '' ]]</para>
584 </td>
585 <td>
586 <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['debit'] or 0.0) ]]</para>
587 </td>
588 <td>
589 <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['credit'] or 0.0) ]]</para>
590 </td>
591 <td>
592 <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['amount_currency'] or 0.0) ]]</para>
593 </td>
594 <td>
595 <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['total_functional'] or 0.0) ]]</para>
596 </td>
597 </tr>
598 </blockTable>
599 <para style="terp_default_2">
600 <font color="white"> </font>
601 </para>
602 </section>
603 <!-- LINES -->
604 <section>
605 <para style="terp_default_8">[[ repeatIn(lines(p, account_code), 'line') ]]</para>
606 <blockTable colWidths="77.0,25.0,88.0,41.0,139.0,50.0,30.0,70.0,70.0,80.0,92.0" style="Table14">
607 <tr>
608 <td>
609 <para style="P3">[[ formatLang(line['date'], date=True) ]]</para>
610 </td>
611 <td>
612 <para style="P7">[[ line['code'] ]]</para>
613 </td>
614 <td>
615 <para style="P8">[[ line['move_name'] ]]</para>
616 </td>
617 <td>
618 <para style="P7">[[ line['a_code'] ]]</para>
619 </td>
620 <td>
621 <para style="P3">[[ format_entry_label('%s - %s' % (line['ref'] or '', line['name'] or ''), 29) ]]</para>
622 </td>
623 <td>
624 <para style="P3">[[ line['reconcile_txt'] or '' ]]</para>
625 </td>
626 <td>
627 <para style="P3">[[ line['currency_code'] or '' ]]</para>
628 </td>
629 <td>
630 <para style="P7">[[ formatLang(line['debit'] or 0.0) ]]</para>
631 </td>
632 <td>
633 <para style="P7">[[ formatLang(line['credit'] or 0.0) ]]</para>
634 </td>
635 <td>
636 <para style="P7">[[ (line['currency_id'] == None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] or 0.0) ]]</para>
637 </td>
638 <td>
639 <para style="P7">[[ formatLang(line['total_functional'] or 0.0) ]]</para>
640 </td>
641 </tr>
642 </blockTable>
643 <para style="terp_default_2">
644 <font color="white"> </font>
645 </para>
646 </section>
647 </section>
648 <para style="terp_default_2">
649 <font color="white"> </font>
650 </para>
651 </section>
652 </story>
653</document>
0654
=== modified file 'bin/addons/account/wizard/__init__.py'
--- bin/addons/account/wizard/__init__.py 2020-04-16 14:07:13 +0000
+++ bin/addons/account/wizard/__init__.py 2022-06-01 15:15:45 +0000
@@ -67,6 +67,7 @@
6767
68import free_allocation_wizard68import free_allocation_wizard
69import account_invoice_import69import account_invoice_import
70import account_report_common_employee
71import account_report_employee_balance
72import account_report_employee_ledger
70# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:73# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
71
72
7374
=== added file 'bin/addons/account/wizard/account_report_common_employee.py'
--- bin/addons/account/wizard/account_report_common_employee.py 1970-01-01 00:00:00 +0000
+++ bin/addons/account/wizard/account_report_common_employee.py 2022-06-01 15:15:45 +0000
@@ -0,0 +1,86 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2022 TeMPO Consulting,MSF
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from osv import osv, fields
23import pooler
24from tools.translate import _
25
26
27class account_common_employee_report(osv.osv_memory):
28 _name = 'account.common.employee.report'
29 _description = 'Account Common Employee Report'
30 _inherit = "account.common.partner.report"
31 _columns = {
32 'result_selection': fields.selection([('customer', 'Receivable Accounts'),
33 ('supplier', 'Payable Accounts'),
34 ('customer_supplier', 'Receivable and Payable Accounts')],
35 "Employee's", required=True),
36 'account_domain': fields.char('Account domain', size=250, required=False),
37 }
38
39 def onchange_result_selection(self, cr, uid, ids, result_selection, context=None):
40 """
41 Adapts the domain of the account according to the selections made by the user
42 Note: directly changing the domain on the many2many field "account_ids" doesn't work in that case so we use the
43 invisible field "account_domain" to store the domain and use it in the view...
44 """
45 if context is None:
46 context = {}
47 res = {}
48 if result_selection == 'supplier':
49 account_domain = [('type', 'in', ['payable'])]
50 elif result_selection == 'customer':
51 account_domain = [('type', 'in', ['receivable'])]
52 else:
53 account_domain = [('type', 'in', ['payable', 'receivable'])]
54 res['value'] = {'account_domain': '%s' % account_domain}
55 return res
56
57 def onchange_payment_method(self, cr, uid, ids, payment_method, context=None):
58 """
59 Exclude expatriate when one method of payment is chosen and only display Nat staff using this method of payment.
60 """
61 if context is None:
62 context = {}
63 res = {}
64 if payment_method and payment_method != 'blank':
65 res['value'] = {'employee_type': 'local'}
66 return res
67
68 def onchange_employee_type(self, cr, uid, ids, employee_type, context=None):
69 """
70 When expatriate is selected set method of payment to blank
71 """
72 if context is None:
73 context = {}
74 res = {}
75 if not employee_type or employee_type in ('', 'ex'):
76 res['value'] = {'payment_method': 'blank'}
77 return res
78
79 _defaults = {
80 'result_selection': 'customer',
81 }
82
83
84account_common_employee_report()
85
86#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
087
=== added file 'bin/addons/account/wizard/account_report_employee_balance.py'
--- bin/addons/account/wizard/account_report_employee_balance.py 1970-01-01 00:00:00 +0000
+++ bin/addons/account/wizard/account_report_employee_balance.py 2022-06-01 15:15:45 +0000
@@ -0,0 +1,55 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2022 TeMPO Consulting, MSF
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from osv import fields, osv
23
24
25class account_employee_balance(osv.osv_memory):
26 """
27 This wizard will provide the employee balance report by periods, between any two dates.
28 """
29 _inherit = 'account.common.employee.report'
30 _name = 'account.employee.balance'
31 _description = 'Print Account Employee Balance'
32 _columns = {
33 'display_employee': fields.selection([('non-zero_balance', 'With balance is not equal to 0'),
34 ('all', 'All Employees')], 'Display Employees'),
35 }
36
37 _defaults = {
38 'display_employee': 'non-zero_balance',
39 }
40
41 def _print_report(self, cr, uid, ids, data, context=None):
42 if context is None:
43 context = {}
44 data = self.pre_print_report(cr, uid, ids, data, context=context)
45 data['form'].update(self.read(cr, uid, ids, ['display_employee'])[0])
46 return {
47 'type': 'ir.actions.report.xml',
48 'report_name': 'account.employee.balance',
49 'datas': data,
50 }
51
52
53account_employee_balance()
54
55# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
056
=== added file 'bin/addons/account/wizard/account_report_employee_ledger.py'
--- bin/addons/account/wizard/account_report_employee_ledger.py 1970-01-01 00:00:00 +0000
+++ bin/addons/account/wizard/account_report_employee_ledger.py 2022-06-01 15:15:45 +0000
@@ -0,0 +1,127 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2022 TeMPO Consulting, MSF. All Rights Reserved
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from osv import fields, osv
23
24
25class account_employee_ledger(osv.osv_memory):
26 """
27 This wizard will provide the employee Ledger report by periods, between any two dates.
28 """
29 _name = 'account.employee.ledger'
30 _inherit = 'account.common.employee.report'
31 _description = 'Account Employee Ledger'
32
33 def get_payment_methods(self, cr, uid, context):
34 pm_obj = self.pool.get('hr.payment.method')
35 pm_ids = pm_obj.search(cr, uid, [], context=context)
36 pm_names = pm_obj.read(cr, uid, pm_ids, ['name'], context=context)
37 res = [('blank', '')]
38 res += [(pm_name['name'], pm_name['name']) for pm_name in pm_names]
39 return res
40
41 def get_employee_type(self, cr, uid, context):
42 return self.pool.get('hr.employee').fields_get(cr, uid, ['employee_type'], context=context)['employee_type']['selection']
43
44 _columns = {
45 'reconciled': fields.selection([
46 ('empty', ''),
47 ('yes', 'Yes'),
48 ('no', 'No'),
49 ], string='Reconciled'),
50 'page_split': fields.boolean('One Employee Per Page', help='Display Ledger Report with One employee per page (PDF version only)'),
51 'employee_ids': fields.many2many('hr.employee', 'account_employee_ledger_employee_rel', 'wizard_id', 'identification_id', string='Employees',
52 help='Display the report for specific employees only'),
53 'only_active_employees': fields.boolean('Only active employees', help='Display the report for active employees only'),
54 'instance_ids': fields.many2many('msf.instance', 'account_employee_ledger_instance_rel', 'wizard_id', 'instance_id', string='Proprietary Instances',
55 help='Display the report for specific proprietary instances only'),
56 'account_ids': fields.many2many('account.account', 'account_employee_ledger_account_rel', 'wizard_id', 'account_id', string='Accounts',
57 help='Display the report for specific accounts only'),
58 'display_employee': fields.selection([('all', 'All Employees'), ('with_movements', 'With movements'),
59 ('non-zero_balance', 'With balance is not equal to 0')],
60 string='Display Employees', required=True),
61 'employee_type': fields.selection(get_employee_type, string='Employee Type', required=False),
62 'payment_method': fields.selection(get_payment_methods, string='Method of Payment', required=False),
63 }
64
65 _defaults = {
66 'reconciled': 'empty',
67 'page_split': False,
68 'result_selection': 'customer_supplier',
69 'account_domain': "[('type', 'in', ['payable', 'receivable'])]",
70 'only_active_employees': False,
71 'fiscalyear_id': False,
72 'display_employee': 'with_movements',
73 'employee_type': '',
74 'payment_method': 'blank',
75 }
76
77 def _print_report(self, cr, uid, ids, data, context=None):
78 if context is None:
79 context = {}
80 data = self.pre_print_report(cr, uid, ids, data, context=context)
81 data['form'].update(self.read(cr, uid, ids, ['reconciled', 'page_split', 'employee_ids',
82 'only_active_employees', 'instance_ids', 'account_ids',
83 'display_employee', 'employee_type', 'payment_method'])[0])
84 if not data['form']['employee_type']:
85 data['form']['employee_type'] = ''
86 self._check_dates_fy_consistency(cr, uid, data, context)
87 if data['form']['page_split']:
88 return {
89 'type': 'ir.actions.report.xml',
90 'report_name': 'account.employee_ledger',
91 'datas': data,
92 }
93 return {
94 'type': 'ir.actions.report.xml',
95 'report_name': 'account.employee_ledger_other',
96 'datas': data,
97 }
98
99 def print_report_xls(self, cr, uid, ids, data, context=None):
100 if context is None:
101 context = {}
102 data = {'keep_open': 1, 'ids': context.get('active_ids', []),
103 'model': context.get('active_model', 'ir.ui.menu'), 'form': self.read(cr, uid, ids,
104 ['date_from', 'date_to',
105 'fiscalyear_id', 'journal_ids',
106 'period_from', 'period_to',
107 'filter', 'chart_account_id',
108 'target_move'])[0]}
109 used_context = self._build_contexts(cr, uid, ids, data, context=context)
110 data['form']['periods'] = used_context.get('periods', False) and used_context['periods'] or []
111 data['form']['used_context'] = used_context
112
113 data = self.pre_print_report(cr, uid, ids, data, context=context)
114 data['form'].update(self.read(cr, uid, ids, ['reconciled', 'page_split', 'employee_ids',
115 'only_active_employees', 'instance_ids', 'account_ids',
116 'display_employee', 'employee_type', 'payment_method'])[0])
117 if not data['form']['employee_type']:
118 data['form']['employee_type'] = ''
119 self._check_dates_fy_consistency(cr, uid, data, context)
120 return {
121 'type': 'ir.actions.report.xml',
122 'report_name': 'account.employee_ledger_xls',
123 'datas': data,
124 }
125
126
127account_employee_ledger()
0128
=== added file 'bin/addons/account/wizard/account_report_employee_ledger_view.xml'
--- bin/addons/account/wizard/account_report_employee_ledger_view.xml 1970-01-01 00:00:00 +0000
+++ bin/addons/account/wizard/account_report_employee_ledger_view.xml 2022-06-01 15:15:45 +0000
@@ -0,0 +1,85 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="account_employee_ledger_view" model="ir.ui.view">
6 <field name="name">Employee Ledger</field>
7 <field name="model">account.employee.ledger</field>
8 <field name="type">form</field>
9 <field name="inherit_id" ref="account_common_report_view" />
10 <field name="arch" type="xml">
11 <data>
12 <xpath expr="/form/label[@string='']" position="replace">
13 <separator string="Employee Ledger" colspan="4"/>
14 <label nolabel="1" colspan="4" string="This report is an analysis done by employee. It is a report containing one line per employee representing the cumulative credit balance."/>
15 </xpath>
16 <xpath expr="//field[@name='target_move']" position="after">
17 <field name="result_selection" on_change="onchange_result_selection(result_selection)"/>
18 <field name="display_employee"/>
19 <field name="page_split"/>
20 <field name="reconciled"/>
21 <field name="only_active_employees"/>
22 <field name="employee_type" on_change="onchange_employee_type(employee_type)"/>
23 <field name="payment_method" on_change="onchange_payment_method(payment_method)"/>
24 <newline/>
25 <field name="instance_ids" domain="[('instance_to_display_ids','=',True)]">
26 <tree noteditable="1">
27 <field name="code"/>
28 <field name="name"/>
29 </tree>
30 </field>
31 <field name="employee_ids">
32 <tree noteditable="1">
33 <field name="name_resource"/>
34 <field name="identification_id"/>
35 <field name="employee_type"/>
36 </tree>
37 </field>
38 <field name="account_domain" invisible="1"/>
39 <field name="account_ids" domain="account_domain">
40