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.

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 <tree noteditable="1">
41 <field name="code"/>
42 <field name="name"/>
43 </tree>
44 </field>
45 </xpath>
46 <xpath expr="//field[@name='fiscalyear_id']" position="attributes">
47 <attribute name="on_change">onchange_fiscalyear(fiscalyear_id)</attribute>
48 </xpath>
49 <xpath expr="//field[@name='period_from']" position="attributes">
50 <attribute name="domain">[]</attribute>
51 </xpath>
52 <xpath expr="//field[@name='period_to']" position="attributes">
53 <attribute name="domain">[]</attribute>
54 </xpath>
55 <xpath expr="//group[1]" position="replace">
56 <group col="4" colspan="4">
57 <button icon="gtk-print" name="check_report" string="Print PDF" type="object" colspan="2" default_focus="1" />
58 <button icon="gtk-print" name="print_report_xls" string="Print Excel" type="object" colspan="2" />
59 <button icon="gtk-cancel" special="cancel" string="Cancel" colspan="4"/>
60 </group>
61 </xpath>
62 </data>
63 </field>
64 </record>
65
66 <record id="action_account_employee_ledger" model="ir.actions.act_window">
67 <field name="name">Employee Ledger</field>
68 <field name="res_model">account.employee.ledger</field>
69 <field name="type">ir.actions.act_window</field>
70 <field name="view_type">form</field>
71 <field name="view_mode">form</field>
72 <field name="view_id" ref="account_employee_ledger_view"/>
73 <field name="context">{'record_id':active_id}</field>
74 <field name="target">new</field>
75 </record>
76
77 <menuitem icon="STOCK_PRINT"
78 name="Employee Ledger"
79 action="action_account_employee_ledger"
80 id="menu_account_employee_ledger"
81 parent="account.employee_menu"
82 sequence="1999" />
83
84 </data>
85 </openerp>
086
=== modified file 'bin/addons/finance/__openerp__.py'
--- bin/addons/finance/__openerp__.py 2020-12-14 16:46:05 +0000
+++ bin/addons/finance/__openerp__.py 2022-06-01 15:15:45 +0000
@@ -42,6 +42,7 @@
42 'wizard/fo_follow_up_finance_wizard_view.xml',42 'wizard/fo_follow_up_finance_wizard_view.xml',
43 'cash_request_data.xml',43 'cash_request_data.xml',
44 'cash_request_view.xml',44 'cash_request_view.xml',
45 'wizard/account_report_employee_balance_tree_view.xml', # US-6392
45 ],46 ],
46 'test': [],47 'test': [],
47 'installable': True,48 'installable': True,
4849
=== modified file 'bin/addons/finance/account_view.xml'
--- bin/addons/finance/account_view.xml 2022-04-28 08:30:46 +0000
+++ bin/addons/finance/account_view.xml 2022-06-01 15:15:45 +0000
@@ -143,9 +143,19 @@
143 model="account.partner.balance.tree"143 model="account.partner.balance.tree"
144 name="account.partner.balance.tree_xls"144 name="account.partner.balance.tree_xls"
145 file="finance/report/account_partner_balance_tree_xls.mako"145 file="finance/report/account_partner_balance_tree_xls.mako"
146 report_type="webkit" 146 report_type="webkit"
147 string="Partner Balance"/>147 string="Partner Balance"/>
148148
149 <report id="account_employee_balance_tree_xls"
150 auto="False"
151 menu="False"
152 header="False"
153 model="account.employee.balance.tree"
154 name="account.employee.balance.tree_xls"
155 file="finance/report/account_employee_balance_tree_xls.mako"
156 report_type="webkit"
157 string="Employee Balance"/>
158
149 <record id="account.action_account_moves_all_a" model="ir.actions.act_window">159 <record id="account.action_account_moves_all_a" model="ir.actions.act_window">
150 <field name="context">{'search_default_posted': 1, 'target_filename_prefix': 'Journal Items'}</field>160 <field name="context">{'search_default_posted': 1, 'target_filename_prefix': 'Journal Items'}</field>
151 </record>161 </record>
152162
=== modified file 'bin/addons/finance/report/__init__.py'
--- bin/addons/finance/report/__init__.py 2020-12-15 14:17:25 +0000
+++ bin/addons/finance/report/__init__.py 2022-06-01 15:15:45 +0000
@@ -2,3 +2,4 @@
2import account_report_name2import account_report_name
3import cash_request_parser3import cash_request_parser
4import fo_follow_up_finance4import fo_follow_up_finance
5import account_employee_balance_tree
56
=== added file 'bin/addons/finance/report/account_employee_balance_tree.py'
--- bin/addons/finance/report/account_employee_balance_tree.py 1970-01-01 00:00:00 +0000
+++ bin/addons/finance/report/account_employee_balance_tree.py 2022-06-01 15:15:45 +0000
@@ -0,0 +1,311 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2022 TeMPO Consulting
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 tools.translate import _
23from report import report_sxw
24from spreadsheet_xml.spreadsheet_xml_write import SpreadsheetReport
25import pooler
26
27
28class account_employee_balance_tree(report_sxw.rml_parse):
29
30 def __init__(self, cr, uid, name, context=None):
31 super(account_employee_balance_tree, self).__init__(cr, uid, name, context=context)
32 self.aebt_obj = self.pool.get('account.employee.balance.tree')
33 self.uid = uid
34 self.has_data = True
35 self.localcontext.update({
36 # header
37 'get_account': self._get_account,
38 'get_fiscalyear': self._get_fiscalyear,
39 'get_journals_str': self._get_journals_str,
40 'get_filter': self._get_filter,
41 'get_filter_info': self._get_filter_info,
42 'get_start_date':self._get_start_date,
43 'get_end_date':self._get_end_date,
44 'get_start_period': self.get_start_period,
45 'get_end_period': self.get_end_period,
46 'get_target_move': self._get_target_move,
47 'get_prop_instances_str': self._get_prop_instances_str,
48 'get_type_of_accounts': self._get_type_of_accounts,
49 'get_accounts_str': self._get_accounts_str,
50 'get_reconcile_selection': self._get_reconcile_selection,
51 'get_display_employees_selection': self._get_display_employees_selection,
52 'get_employee_type': self._get_employee_type,
53 'get_payment_methods': self._get_payment_methods,
54
55 # data
56 'get_employees': self._get_employees,
57 'get_employee_account_move_lines': self._get_employee_account_move_lines,
58 'get_lines_per_currency': self._get_lines_per_currency,
59 'get_employees_total_debit_credit_balance': self._get_employees_total_debit_credit_balance,
60 'get_has_data': self._get_has_data,
61 })
62
63 def set_context(self, objects, data, ids, report_type=None):
64 self.display_employee = data['form'].get('display_employee', 'non-zero_balance')
65 self.result_selection = data['form'].get('result_selection')
66 self.target_move = data['form'].get('target_move', 'all')
67 return super(account_employee_balance_tree, self).set_context(objects, data, ids, report_type=report_type)
68
69 def _get_employee_type(self, data):
70 """
71 Returns the String to display in the "Employee Type" section of the report header
72 """
73 emp_type = _('All')
74 # if specific employees are selected don't display emp type
75 if data['form'].get('employee_ids', False):
76 emp_type = '-'
77 else:
78 emp = data['form'].get('employee_type', False)
79 if emp == 'local':
80 emp_type = _('Local Staff')
81 if emp == 'ex':
82 emp_type = _('Expatriate Staff')
83 return emp_type
84
85 def _get_payment_methods(self, data):
86 """
87 Returns the String to display in the "Payment Method" section of the report header
88 """
89 pay_method = _('All')
90 # if specific employees are selected don't display payment method
91 if data['form'].get('employee_ids', False):
92 pay_method = '-'
93 else:
94 method = data['form'].get('payment_method')
95 if method != 'blank':
96 return method
97 return pay_method
98
99 def _get_type_of_accounts(self):
100 if self.result_selection == 'customer':
101 return _('Receivable Accounts')
102 elif self.result_selection == 'supplier':
103 return _('Payable Accounts')
104 elif self.result_selection == 'customer_supplier':
105 return _('Receivable and Payable Accounts')
106 return ''
107
108 def _get_has_data(self):
109 """
110 Returns True if there is data to display in the report
111 """
112 return bool(self.has_data)
113
114 def _get_employees(self, data):
115 """ return a list of 1 or 2 elements each element containing browse objects
116 only [payable] or only [receivable] or [payable, receivable]
117 """
118 res = []
119 objects = self.aebt_obj.get_employee_data(self.cr, self.uid, data)
120 if objects:
121 res.append(objects)
122 self.has_data = len(res)
123 return res
124
125 def _get_reconcile_selection(self, data):
126 """
127 Returns "Yes" if "Reconciled: Yes" is selected in the wizard
128 """
129 selection = _('All')
130 if data['form'].get('reconciled', '') == 'yes':
131 selection = _('Yes')
132 elif data['form'].get('reconciled', '') == 'no':
133 selection = _('No')
134 return selection
135
136 def _get_display_employees_selection(self, data):
137 """
138 Returns the String to display in the "Display Employees" section of the report header
139 """
140 selection = ''
141 display_employee = data['form'].get('display_employee', '')
142 if display_employee == 'all':
143 selection = _('All Employees')
144 elif display_employee == 'with_movements':
145 selection = _('With movements')
146 elif display_employee == 'non-zero_balance':
147 selection = _('With balance is not equal to 0')
148 return selection
149
150 def _get_employee_account_move_lines(self, employee_id, data):
151 return self.aebt_obj.get_employee_account_move_lines_data(self.cr, self.uid, employee_id, data)
152
153 def _get_lines_per_currency(self, employee_id, data, account_code):
154 return self.aebt_obj.get_lines_per_currency(self.cr, self.uid, employee_id, data, account_code)
155
156 def _get_employees_total_debit_credit_balance(self, data):
157 return self.aebt_obj.get_employees_total_debit_credit_balance(self.cr, self.uid, data)
158
159 def _get_filter_info(self, data):
160 """ get filter info
161 _get_filter, _get_start_date, _get_end_date,
162 get_start_period, get_end_period
163 are from common_report_header
164 """
165 res = ''
166 f = self._get_filter(data)
167 if not f:
168 return res
169
170 if f == _('No Filter'):
171 res = f
172 elif f == _('Date'):
173 res = self.formatLang(self._get_start_date(data), date=True) + ' - ' + self.formatLang(self._get_end_date(data), date=True)
174 elif f == _('Periods'):
175 res = self.get_start_period(data) + ' - ' + self.get_end_period(data)
176 return res
177
178 def _get_start_date(self, data):
179 if data.get('form', False) and data['form'].get('date_from', False):
180 return data['form']['date_from']
181 return ''
182
183 def _get_target_move(self, data):
184 if data.get('form', False) and data['form'].get('target_move', False):
185 if data['form']['target_move'] == 'all':
186 return _('All Entries')
187 return _('All Posted Entries')
188 return ''
189
190 def _get_end_date(self, data):
191 if data.get('form', False) and data['form'].get('date_to', False):
192 return data['form']['date_to']
193 return ''
194
195 def get_start_period(self, data):
196 if data.get('form', False) and data['form'].get('period_from', False):
197 return self.pool.get('account.period').browse(self.cr,self.uid,data['form']['period_from']).name
198 return ''
199
200 def get_end_period(self, data):
201 if data.get('form', False) and data['form'].get('period_to', False):
202 return self.pool.get('account.period').browse(self.cr, self.uid, data['form']['period_to']).name
203 return ''
204
205 def _get_account(self, data):
206 if data.get('form', False) and data['form'].get('chart_account_id', False):
207 return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).name
208 return ''
209
210 def _get_accounts(self, data):
211 """
212 Returns:
213 - "All Accounts" if no specific account is selected
214 - or the codes of all accounts selected
215 """
216 account_ids = data.get('form', False) and data['form'].get('account_ids', False)
217 if account_ids:
218 account_obj = pooler.get_pool(self.cr.dbname).get('account.account')
219 return [i.code for i in account_obj.browse(self.cr, self.uid, account_ids,
220 fields_to_fetch=['code'], context=data.get('context', {}))]
221 return [_('All Accounts')]
222
223 def _get_accounts_str(self, data):
224 """
225 Returns the list of accounts as a String (cut if > 300 characters)
226 """
227 data_tools_obj = self.pool.get('data.tools')
228 return data_tools_obj.truncate_list(self._get_accounts(data))
229
230 def _get_filter(self, data):
231 if data.get('form', False) and data['form'].get('filter', False):
232 if data['form']['filter'] == 'filter_date':
233 return _('Date')
234 elif data['form']['filter'] == 'filter_period':
235 return _('Periods')
236 return _('No Filter')
237
238 def _get_fiscalyear(self, data):
239 if data.get('form', False) and data['form'].get('fiscalyear_id', False):
240 return self.pool.get('account.fiscalyear').browse(self.cr, self.uid, data['form']['fiscalyear_id']).name
241 return ''
242
243 def _get_company(self, data):
244 if data.get('form', False) and data['form'].get('chart_account_id', False):
245 return self.pool.get.get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.name
246 return ''
247
248 def _get_journal(self, data):
249 """
250 Returns the codes of the journals selected (or "All Journals")
251 """
252 if data.get('form', False) and 'all_journals' in data['form']:
253 return [_('All Journals')]
254 codes = []
255 if data.get('form', False) and data['form'].get('journal_ids', False):
256 self.cr.execute('select distinct(code) from account_journal where id IN %s', (tuple(data['form']['journal_ids']),))
257 codes = [x for x, in self.cr.fetchall()]
258 return codes
259
260 def _get_journals_str(self, data):
261 """
262 Returns the list of journals as a String (cut if > 300 characters)
263 """
264 data_tools_obj = self.pool.get('data.tools')
265 return data_tools_obj.truncate_list(self._get_journal(data))
266
267 def _get_prop_instances(self, data):
268 """
269 Returns the codes of the instances selected (or "All Instances")
270 """
271 if data.get('form', False) and data['form'].get('instance_ids', False):
272 self.cr.execute('select code from msf_instance where id IN %s',(tuple(data['form']['instance_ids']),))
273 return [lt or '' for lt, in self.cr.fetchall()]
274 return [_('All Instances')]
275
276 def _get_prop_instances_str(self, data, pdf=False):
277 """
278 Returns the list of instances as a String (cut if > 300 characters)
279 """
280 display_limit = 300
281 if pdf:
282 # in the PDF version instances are listed one below the other and instance names are cut if > 20 characters
283 instances_str = ',\n'.join([(len(inst) <= 20) and inst or ("%s%s" % (inst[:17], '...'))
284 for inst in self._get_prop_instances(data)])
285 if len(instances_str) > display_limit:
286 instances_str = "%s%s" % (instances_str[:display_limit-3], '...')
287 else:
288 # otherwise instances are simply separated by a comma
289 data_tools_obj = self.pool.get('data.tools')
290 instances_str = data_tools_obj.truncate_list(self._get_prop_instances(data), limit=display_limit)
291 return instances_str
292
293
294class account_employee_balance_tree_xls(SpreadsheetReport):
295 def __init__(self, name, table, rml=False, parser=report_sxw.rml_parse, header='external', store=False):
296 super(account_employee_balance_tree_xls, self).__init__(name, table, rml=rml, parser=parser, header=header, store=store)
297
298 def create(self, cr, uid, ids, data, context=None):
299 a = super(account_employee_balance_tree_xls, self).create(cr, uid, ids, data, context)
300 return (a[0], 'xls')
301
302
303# XLS report
304account_employee_balance_tree_xls('report.account.employee.balance.tree_xls', 'account.employee.balance.tree',
305 'finance/report/account_employee_balance_tree_xls.mako',
306 parser=account_employee_balance_tree, header='internal')
307# PDF report
308report_sxw.report_sxw('report.account.employee.balance', 'hr.employee', 'account/report/account_employee_balance.rml',
309 parser=account_employee_balance_tree, header='internal')
310
311# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
0312
=== added file 'bin/addons/finance/report/account_employee_balance_tree_xls.mako'
--- bin/addons/finance/report/account_employee_balance_tree_xls.mako 1970-01-01 00:00:00 +0000
+++ bin/addons/finance/report/account_employee_balance_tree_xls.mako 2022-06-01 15:15:45 +0000
@@ -0,0 +1,530 @@
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="ssBorderTop">
41<Borders>
42 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
43</Borders>
44</Style>
45<Style ss:ID="ssBorderDate">
46<Alignment ss:Vertical="Center" ss:WrapText="1"/>
47<Borders>
48 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
49 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
50 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
51 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
52</Borders>
53<NumberFormat ss:Format="Short Date" />
54</Style>
55<Style ss:ID="ssNumber">
56<Borders>
57 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
58 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
59 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
60 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
61</Borders>
62<Alignment ss:Horizontal="Right" ss:Vertical="Center" ss:WrapText="1"/>
63<NumberFormat ss:Format="#,##0.00"/>
64</Style>
65<Style ss:ID="ssHeader">
66<Alignment ss:Vertical="Top" ss:Horizontal="Center" ss:WrapText="1"/>
67<Font ss:Bold="1" />
68<Borders>
69 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
70 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
71 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
72 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
73</Borders>
74</Style>
75<Style ss:ID="ssHeaderNumber">
76<Font ss:Bold="1" />
77<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
78<Borders>
79 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
80 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
81 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
82 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
83</Borders>
84<NumberFormat ss:Format="#,##0.00"/>
85</Style>
86<Style ss:ID="ssHeaderRight">
87<Font ss:Bold="1" />
88<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
89<Borders>
90 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
91 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
92 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
93 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
94</Borders>
95</Style>
96<Style ss:ID="ssHeaderCell">
97<Alignment ss:Vertical="Top" ss:Horizontal="Center" ss:WrapText="1"/>
98<Borders>
99 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
100 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
101 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
102 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
103</Borders>
104</Style>
105<Style ss:ID="ssHeaderNumberCell">
106<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
107<Borders>
108 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
109 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
110 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
111 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
112</Borders>
113<NumberFormat ss:Format="#,##0.00"/>
114</Style>
115<Style ss:ID="ssEmployee">
116<Alignment ss:Vertical="Top" ss:WrapText="1"/>
117<Font ss:Bold="1" />
118<Borders>
119 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
120 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
121 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
122 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
123</Borders>
124</Style>
125<Style ss:ID="ssEmployeeNumber">
126<Font ss:Bold="1" />
127<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
128<Borders>
129 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
130 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
131 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
132 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
133</Borders>
134<NumberFormat ss:Format="#,##0.00"/>
135</Style>
136<Style ss:ID="ssEmployeeRight">
137<Font ss:Bold="1" />
138<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
139<Borders>
140 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
141 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
142 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
143 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
144</Borders>
145</Style>
146<Style ss:ID="ssAccountLine">
147<Alignment ss:Vertical="Top" ss:Horizontal="Left" ss:WrapText="1"/>
148<Font ss:Size="8"/>
149<Borders>
150 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
151 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
152 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
153 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
154</Borders>
155</Style>
156<Style ss:ID="ssAccountLineRight">
157<Alignment ss:Vertical="Top" ss:Horizontal="Right" ss:WrapText="1"/>
158<Font ss:Size="8"/>
159<Borders>
160 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
161 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
162 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
163 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
164</Borders>
165</Style>
166<Style ss:ID="ssSubtotalLine">
167<Alignment ss:Vertical="Top" ss:Horizontal="Right" ss:WrapText="1"/>
168<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11"/>
169<Borders>
170 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
171 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
172</Borders>
173</Style>
174<Style ss:ID="ssAccountLineWrap">
175 <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1"/>
176 <Borders>
177 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
178 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
179 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
180 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
181 </Borders>
182 <Font ss:Size="8"/>
183 <Interior/>
184 <NumberFormat/>
185 <Protection/>
186</Style>
187<Style ss:ID="ssAccountLineNumber">
188<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
189<Font ss:Size="8"/>
190<Borders>
191 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
192 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
193 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
194 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
195</Borders>
196<NumberFormat ss:Format="#,##0.00"/>
197</Style>
198<Style ss:ID="ssAccountLineNumberBold">
199<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
200<Font ss:Size="8" ss:Bold="1"/>
201<Borders>
202 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
203 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
204 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
205 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
206</Borders>
207<NumberFormat ss:Format="#,##0.00"/>
208</Style>
209<Style ss:ID="ssSubtotalLineNumber">
210<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
211<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11"/>
212<Borders>
213 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
214 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
215</Borders>
216<NumberFormat ss:Format="#,##0.00"/>
217</Style>
218<Style ss:ID="ssAccountLineAccountCode">
219<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
220<Font ss:Size="8"/>
221<Borders>
222 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
223 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
224 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
225 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
226</Borders>
227<Interior/>
228<NumberFormat ss:Format="0" />
229<Protection/>
230</Style>
231<Style ss:ID="ssAccountLineAccountCodeBold">
232<Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/>
233<Font ss:Size="8" ss:Bold="1"/>
234<Borders>
235 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
236 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
237 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
238 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
239</Borders>
240<Interior/>
241<NumberFormat ss:Format="0" />
242<Protection/>
243</Style>
244</Styles>
245<%
246entries = get_employees(data)
247%>
248% if not entries:
249<Worksheet ss:Name="No entries">
250<Table x:FullColumns="1" x:FullRows="1">
251 <Column ss:AutoFitWidth="1" ss:Width="300" />
252 <Row>
253 <Cell ss:StyleID="ssHeader"><Data ss:Type="String">No entries</Data></Cell>
254 </Row>
255</Table>
256</Worksheet>
257% else:
258% for p_entries in entries:
259<%
260worksheet_name = get_type_of_accounts()
261%>
262<Worksheet ss:Name="${worksheet_name}">
263<%
264 col_count = 9
265 if data['model'] == 'account.account':
266 header_company_or_chart_of_account = _('Company')
267 else:
268 header_company_or_chart_of_account = _('Chart of Account')
269%>
270<Table x:FullColumns="1" x:FullRows="1">
271<Column ss:AutoFitWidth="1" ss:Width="150" />
272<Column ss:AutoFitWidth="1" ss:Width="60" />
273<Column ss:AutoFitWidth="1" ss:Width="120" />
274<Column ss:AutoFitWidth="1" ss:Width="120" />
275<Column ss:AutoFitWidth="1" ss:Width="120" />
276<Column ss:AutoFitWidth="1" ss:Width="100" />
277<Column ss:AutoFitWidth="1" ss:Width="100" />
278<Column ss:AutoFitWidth="1" ss:Width="100" />
279<Column ss:AutoFitWidth="1" ss:Width="100" />
280## header
281<%
282header_col_merge_count = col_count - 1
283selected_filter = get_filter(data) or ''
284%>
285<Row>
286 <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${header_company_or_chart_of_account}</Data></Cell>
287 <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Fiscal Year')}</Data></Cell>
288 <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Journals')}</Data></Cell>
289 <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Accounts')}</Data></Cell>
290 <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Proprietary Instances')}</Data></Cell>
291 <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${'%s %s' % (_('Filter By'), (selected_filter != _('No Filter') and selected_filter or ''))|x}</Data></Cell>
292 <Cell ss:StyleID="ssHeader" ss:MergeAcross="1"><Data ss:Type="String">${_('Display')}</Data></Cell>
293 <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Func. Currency')}</Data></Cell>
294</Row>
295<Row>
296 <Cell ss:StyleID="ssHeaderCell">
297 <Data ss:Type="String">${(get_account(data) or '')|x}</Data>
298 </Cell>
299 <Cell ss:StyleID="ssHeaderCell">
300 <Data ss:Type="String">${(get_fiscalyear(data) or '')|x}</Data>
301 </Cell>
302 <Cell ss:StyleID="ssHeaderCell">
303 <Data ss:Type="String">${ get_journals_str(data)|x}</Data>
304 </Cell>
305 <Cell ss:StyleID="ssHeaderCell">
306 <Data ss:Type="String">${ get_accounts_str(data)|x}</Data>
307 </Cell>
308 <Cell ss:StyleID="ssHeaderCell">
309 <Data ss:Type="String">${ get_prop_instances_str(data)|x}</Data>
310 </Cell>
311 <Cell ss:StyleID="ssHeaderCell">
312 <Data ss:Type="String">${(get_filter_info(data) or '')|x}</Data>
313 </Cell>
314 <Cell ss:StyleID="ssHeaderCell" ss:MergeAcross="1">
315 <Data ss:Type="String">${ "%s: %s, %s: %s, %s: %s, %s: %s, %s: %s, %s: %s" % (
316 _("Employee's"), get_type_of_accounts() or '',
317 _('Target Moves'), get_target_move(data) or '',
318 _('Reconciled'), get_reconcile_selection(data),
319 _('Display Employees'), get_display_employees_selection(data),
320 _('Employee Type'), get_employee_type(data) or '-',
321 _('Payment Method'), get_payment_methods(data) or '-',
322 )|x}</Data>
323 </Cell>
324 <Cell ss:StyleID="ssHeaderCell">
325 <Data ss:Type="String">${company.currency_id.name|x}</Data>
326 </Cell>
327</Row>
328## separation line after header
329<Row>
330% for n in range(col_count):
331<Cell ss:StyleID="ssCell">
332 <Data ss:Type="String"></Data>
333</Cell>
334% endfor
335</Row>
336## employee header
337<Row>
338<Cell ss:StyleID="ssHeader" ss:MergeAcross="2">
339 <Data ss:Type="String">${_('Employee')}</Data>
340</Cell>
341<Cell ss:StyleID="ssHeaderRight">
342 <Data ss:Type="String">${_('Account')}</Data>
343</Cell>
344<Cell ss:StyleID="ssHeaderRight">
345 <Data ss:Type="String">${_('Currency')}</Data>
346</Cell>
347<Cell ss:StyleID="ssHeaderRight">
348 <Data ss:Type="String">${_('Debit')}</Data>
349</Cell>
350<Cell ss:StyleID="ssHeaderRight">
351 <Data ss:Type="String">${_('Credit')}</Data>
352</Cell>
353<Cell ss:StyleID="ssHeaderRight">
354 <Data ss:Type="String">${_('Booking Balance')}</Data>
355</Cell>
356<Cell ss:StyleID="ssHeaderRight">
357 <Data ss:Type="String">${'%s %s' % (_('Balance'), company.currency_id.name)|x}</Data>
358</Cell>
359</Row>
360
361<Row>
362## total debit / credit / balance row
363<%
364debit, credit, balance = get_employees_total_debit_credit_balance(data)
365%>
366<Cell ss:StyleID="ssCellRightBold" ss:MergeAcross="3">
367 <Data ss:Type="String">${_('TOTAL EMPLOYEES')}</Data>
368</Cell>
369<Cell ss:StyleID="ssEmployeeRight">
370 <Data ss:Type="String">${company.currency_id.name|x}</Data>
371</Cell>
372<Cell ss:StyleID="ssHeaderNumber">
373 <Data ss:Type="Number">${debit or 0.|x}</Data>
374</Cell>
375<Cell ss:StyleID="ssHeaderNumber">
376 <Data ss:Type="Number">${credit or 0.|x}</Data>
377</Cell>
378<Cell ss:StyleID="ssHeaderNumber">
379 <Data ss:Type="String">-</Data>
380</Cell>
381<Cell ss:StyleID="ssHeaderNumber">
382 <Data ss:Type="Number">${balance or 0.|x}</Data>
383</Cell>
384</Row>
385
386## employee row
387% for p_obj in p_entries:
388<%
389employee_name = (p_obj.name or '')
390%>
391<Row>
392<Cell ss:StyleID="ssEmployee" ss:MergeAcross="3">
393 <Data ss:Type="String">${employee_name|x}</Data>
394</Cell>
395<Cell ss:StyleID="ssEmployeeRight">
396 <Data ss:Type="String">${company.currency_id.name|x}</Data>
397</Cell>
398<Cell ss:StyleID="ssEmployeeNumber">
399 <Data ss:Type="Number">${p_obj.debit or 0.|x}</Data>
400</Cell>
401<Cell ss:StyleID="ssEmployeeNumber">
402 <Data ss:Type="Number">${p_obj.credit or 0.|x}</Data>
403</Cell>
404 <Cell ss:StyleID="ssEmployeeNumber">
405 <Data ss:Type="Number">${p_obj.balance or 0.|x}</Data>
406</Cell>
407<Cell ss:StyleID="ssEmployeeNumber">
408 <Data ss:Type="Number">${p_obj.balance or 0.|x}</Data>
409</Cell>
410</Row>
411
412## account move line row
413% for aml in get_employee_account_move_lines(p_obj.employee_id.id, data):
414<Row>
415<Cell ss:StyleID="ssAccountLine">
416 <Data ss:Type="String"></Data>
417</Cell>
418<Cell ss:StyleID="ssAccountLine">
419 <Data ss:Type="String"></Data>
420</Cell>
421<Cell ss:StyleID="ssAccountLine">
422 <Data ss:Type="String"></Data>
423</Cell>
424<Cell ss:StyleID="ssAccountLineAccountCodeBold">
425 <Data ss:Type="String">${aml.get('account', '')|x}</Data>
426</Cell>
427<Cell ss:StyleID="ssAccountLineAccountCodeBold">
428 <Data ss:Type="String">${company.currency_id.name|x}</Data>
429</Cell>
430<Cell ss:StyleID="ssAccountLineNumberBold">
431 <Data ss:Type="Number">${aml.get('deb') or 0.|x}</Data>
432</Cell>
433<Cell ss:StyleID="ssAccountLineNumberBold">
434 <Data ss:Type="Number">${aml.get('cred') or 0.|x}</Data>
435</Cell>
436<Cell ss:StyleID="ssAccountLineNumberBold">
437 <Data ss:Type="Number">${aml.get('total') or 0.|x}</Data>
438</Cell>
439<Cell ss:StyleID="ssAccountLineNumberBold">
440 <Data ss:Type="Number">${aml.get('total') or 0.|x}</Data>
441</Cell>
442</Row>
443
444<!-- SUBTOTALS per currency -->
445% for detail_line in get_lines_per_currency(p_obj.employee_id.id, data, aml.get('account', '')):
446<Row>
447<Cell ss:StyleID="ssSubtotalLine" ss:MergeAcross="2">
448 <Data ss:Type="String"></Data>
449</Cell>
450<Cell ss:StyleID="ssSubtotalLine">
451 <Data ss:Type="String">${_('Subtotal')}</Data>
452</Cell>
453<Cell ss:StyleID="ssSubtotalLine">
454 <Data ss:Type="String">${detail_line.get('currency_booking', '')|x}</Data>
455</Cell>
456<Cell ss:StyleID="ssSubtotalLineNumber">
457 <Data ss:Type="Number">${detail_line.get('debit_booking') or 0.|x}</Data>
458</Cell>
459<Cell ss:StyleID="ssSubtotalLineNumber">
460 <Data ss:Type="Number">${detail_line.get('credit_booking') or 0.|x}</Data>
461</Cell>
462<Cell ss:StyleID="ssSubtotalLineNumber">
463 <Data ss:Type="Number">${detail_line.get('total_booking') or 0.|x}</Data>
464</Cell>
465<Cell ss:StyleID="ssSubtotalLineNumber">
466 <Data ss:Type="Number">${detail_line.get('total_functional') or 0.|x}</Data>
467</Cell>
468</Row>
469% endfor
470% endfor
471% endfor
472<Row>
473<Cell ss:StyleID="ssBorderTop">
474 <Data ss:Type="String"></Data>
475</Cell>
476<Cell ss:StyleID="ssBorderTop">
477 <Data ss:Type="String"></Data>
478</Cell>
479<Cell ss:StyleID="ssBorderTop">
480 <Data ss:Type="String"></Data>
481</Cell>
482<Cell ss:StyleID="ssBorderTop">
483 <Data ss:Type="String"></Data>
484</Cell>
485<Cell ss:StyleID="ssBorderTop">
486 <Data ss:Type="String"></Data>
487</Cell>
488<Cell ss:StyleID="ssBorderTop">
489 <Data ss:Type="String"></Data>
490</Cell>
491<Cell ss:StyleID="ssBorderTop">
492 <Data ss:Type="String"></Data>
493</Cell>
494<Cell ss:StyleID="ssBorderTop">
495 <Data ss:Type="String"></Data>
496</Cell>
497<Cell ss:StyleID="ssBorderTop">
498 <Data ss:Type="String"></Data>
499</Cell>
500</Row>
501</Table>
502<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
503 <FitToPage/>
504 <PageSetup>
505 <Layout x:Orientation="Landscape"/>
506 <Header x:Data="&amp;C&amp;&quot;Arial,Bold&quot;&amp;14Employee Balance"/>
507 <Footer x:Data="Page &amp;P of &amp;N"/>
508 </PageSetup>
509 <Print>
510 <ValidPrinterInfo/>
511 <PaperSizeIndex>9</PaperSizeIndex>
512 <HorizontalResolution>600</HorizontalResolution>
513 <VerticalResolution>600</VerticalResolution>
514 </Print>
515 <Selected/>
516 <Panes>
517 <Pane>
518 <Number>3</Number>
519 <ActiveRow>17</ActiveRow>
520 </Pane>
521 </Panes>
522 <ProtectObjects>False</ProtectObjects>
523 <ProtectScenarios>False</ProtectScenarios>
524</WorksheetOptions>
525</Worksheet>
526% endfor
527## endfor Worksheet
528% endif
529## endif if not entries
530</Workbook>
0531
=== modified file 'bin/addons/finance/report/account_report_name.py'
--- bin/addons/finance/report/account_report_name.py 2014-03-14 15:47:48 +0000
+++ bin/addons/finance/report/account_report_name.py 2022-06-01 15:15:45 +0000
@@ -50,4 +50,28 @@
50 return update_name(self, cr, uid, _('Partner Ledger'), ret, context)50 return update_name(self, cr, uid, _('Partner Ledger'), ret, context)
5151
52account_partner_ledger()52account_partner_ledger()
53
54
55class account_employee_balance(osv.osv_memory):
56 _name = 'account.employee.balance'
57 _inherit = 'account.employee.balance'
58
59 def _print_report(self, cr, uid, ids, data, context=None):
60 ret = super(account_employee_balance, self)._print_report(cr, uid, ids, data, context)
61 return update_name(self, cr, uid, _('Employee Balance'), ret, context)
62
63
64account_employee_balance()
65
66
67class account_employee_ledger(osv.osv_memory):
68 _name = 'account.employee.ledger'
69 _inherit = 'account.employee.ledger'
70
71 def _print_report(self, cr, uid, ids, data, context=None):
72 ret = super(account_employee_ledger, self)._print_report(cr, uid, ids, data, context)
73 return update_name(self, cr, uid, _('Employee Ledger'), ret, context)
74
75
76account_employee_ledger()
53# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:77# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
5478
=== modified file 'bin/addons/finance/wizard/__init__.py'
--- bin/addons/finance/wizard/__init__.py 2020-12-14 16:46:05 +0000
+++ bin/addons/finance/wizard/__init__.py 2022-06-01 15:15:45 +0000
@@ -1,2 +1,3 @@
1import account_report_partner_balance_tree # uf-17151import account_report_partner_balance_tree # uf-1715
2import fo_follow_up_finance_wizard2import fo_follow_up_finance_wizard
3import account_report_employee_balance_tree # US-6392
34
=== added file 'bin/addons/finance/wizard/account_report_employee_balance_tree.py'
--- bin/addons/finance/wizard/account_report_employee_balance_tree.py 1970-01-01 00:00:00 +0000
+++ bin/addons/finance/wizard/account_report_employee_balance_tree.py 2022-06-01 15:15:45 +0000
@@ -0,0 +1,553 @@
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
23from tools.translate import _
24import decimal_precision as dp
25import datetime
26from datetime import timedelta
27
28
29class account_employee_balance_tree(osv.osv):
30 _name = 'account.employee.balance.tree'
31 _description = 'Print Account Employee Balance View'
32 _columns = {
33 'uid': fields.many2one('res.users', 'Uid', invisible=True),
34 'build_ts': fields.datetime('Build timestamp', invisible=True),
35 'account_type': fields.selection([
36 ('payable', 'Payable'),
37 ('receivable', 'Receivable')
38 ],
39 'Account type'), # not used since US-3873
40 'employee_id': fields.many2one('hr.employee', 'Employee', invisible=True),
41 'name': fields.char('Employee', size=168), # employee name
42 'employee_identification_id': fields.char('Employee Identification number', size=64 ),
43 'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),
44 'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')),
45 'balance': fields.float('Balance', digits_compute=dp.get_precision('Account')),
46 'ib_debit': fields.float('Initial Balance Debit', digits_compute=dp.get_precision('Account')), # not used since US-3873
47 'ib_credit': fields.float('Initial Balance Credit', digits_compute=dp.get_precision('Account')), # not used since US-3873
48 'ib_balance': fields.float('IB Balance', digits_compute=dp.get_precision('Account')), # not used since US-3873
49 }
50
51 _order = "name, employee_id"
52
53 def __init__(self, pool, cr):
54 super(account_employee_balance_tree, self).__init__(pool, cr)
55 self.total_debit_credit_balance = {}
56 self.move_line_ids = {}
57
58 def _execute_query_employees(self, cr, uid, data):
59 """
60 Returns a list of dicts, each containing data for one employee
61 """
62 obj_move = self.pool.get('account.move.line')
63 used_context = data['form'].get('used_context', {})
64
65 result_selection = data['form'].get('result_selection', '')
66 if (result_selection == 'customer'):
67 account_type = "('receivable')"
68 elif (result_selection == 'supplier'):
69 account_type = "('payable')"
70 else:
71 account_type = "('payable', 'receivable')"
72
73 move_state = "('draft','posted')"
74 if data['form'].get('target_move', 'all') == 'posted':
75 move_state = "('posted')"
76
77 fiscalyear_id = data['form'].get('fiscalyear_id', False)
78 if not fiscalyear_id:
79 # by default all FY taken into account
80 used_context.update({'all_fiscalyear': True})
81
82 where = obj_move._query_get(cr, uid, obj='l', context=used_context) or ''
83
84 # reconciliation filter
85 reconcile_filter = data['form'].get('reconciled', '')
86 if reconcile_filter == 'yes':
87 self.RECONCILE_REQUEST = "AND l.reconcile_id IS NOT NULL"
88 elif reconcile_filter == 'no':
89 self.RECONCILE_REQUEST = "AND l.reconcile_id IS NULL AND ac.reconcile='t'" # reconcilable entries not reconciled
90 else: # 'empty'
91 self.RECONCILE_REQUEST = ""
92
93 # proprietary instances filter
94 self.INSTANCE_REQUEST = ''
95 instance_ids = data['form'].get('instance_ids', False)
96 if instance_ids:
97 self.INSTANCE_REQUEST = " AND l.instance_id in(%s)" % (",".join(map(str, instance_ids)))
98
99 self.EMPLOYEE_PAY_METHOD = ''
100 self.EMPLOYEE_REQUEST = ' AND l.employee_id IS NOT NULL'
101 if data['form'].get('employee_ids', False): # some employees are specifically selected
102 employee_ids = data['form']['employee_ids']
103 if len(employee_ids) == 1:
104 self.EMPLOYEE_REQUEST = ' AND p.id = %s' % employee_ids[0]
105 else:
106 self.EMPLOYEE_REQUEST = ' AND p.id IN %s' % (tuple(employee_ids),)
107 else: # if there is not specifically selected employees
108 if data['form'].get('only_active_employees'): # check if we should include only active employees
109 self.EMPLOYEE_REQUEST = " AND res.active = 't'"
110 # check if we should include only a selected type of employees
111 emp_type = data['form'].get('employee_type')
112 if emp_type != '':
113 self.EMPLOYEE_REQUEST += " AND p.employee_type = '%s'" % emp_type.encode("utf-8")
114 # check if we should include only employees using a selected method of payment
115 pay_method = data['form'].get('payment_method')
116 if pay_method != 'blank':
117 self.EMPLOYEE_REQUEST += " AND pay.name = '%s'" % pay_method
118 # do join with payment_method only when local staff is selected because exp staff don't always have payment method registered
119 if emp_type == 'local':
120 self.EMPLOYEE_PAY_METHOD = " JOIN hr_payment_method pay ON (p.payment_method_id = pay.id)"
121
122
123 self.ACCOUNT_REQUEST = ''
124 if data['form'].get('account_ids', False): # some accounts are specifically selected
125 self.ACCOUNT_REQUEST = " AND ac.id IN (%s)" % (",".join(map(str, data['form']['account_ids'])))
126
127 where = where and 'AND %s' % where or ''
128 query = """SELECT p.id as employee_id, p.identification_id as employee_identification_id, p.name_resource as employee_name,
129 COALESCE(sum(debit),0) AS debit, COALESCE(sum(credit), 0) AS credit,
130 CASE WHEN sum(debit) > sum(credit) THEN sum(debit) - sum(credit) ELSE 0 END AS sdebit,
131 CASE WHEN sum(debit) < sum(credit) THEN sum(credit) - sum(debit) ELSE 0 END AS scredit
132 FROM account_move_line l INNER JOIN hr_employee p ON (l.employee_id=p.id)
133 INNER JOIN resource_resource res ON p.resource_id = res.id
134 JOIN account_account ac ON (l.account_id = ac.id)
135 JOIN account_move am ON (am.id = l.move_id)
136 %s
137 WHERE ac.type IN %s
138 AND am.state IN %s
139 %s %s %s %s %s
140 GROUP BY p.id, p.identification_id, p.name_resource
141 ORDER BY p.name_resource;""" % (self.EMPLOYEE_PAY_METHOD, account_type, move_state, # not_a_user_entry
142 where, self.INSTANCE_REQUEST, self.EMPLOYEE_REQUEST, self.ACCOUNT_REQUEST,
143 self.RECONCILE_REQUEST)
144 cr.execute(query)
145 res = cr.dictfetchall()
146
147 if data['form'].get('display_employee', '') == 'non-zero_balance':
148 res2 = [r for r in res if r['sdebit'] > 0.0001 or r['scredit'] > 0.0001] # 0.0001 instead of 0 to fix float rounding errors
149 else: # with_movements or all
150 res2 = [r for r in res]
151 return res2
152
153 def _execute_query_selected_employee_move_line_ids(self, cr, uid, employee_id, data):
154 # if this method is re-called with the same arguments don't recompute the result
155 if not self.move_line_ids or employee_id != self.move_line_ids['employee_id'] or data != self.move_line_ids['data']:
156 obj_move = self.pool.get('account.move.line')
157 where = obj_move._query_get(cr, uid, obj='l', context=data['form'].get('used_context', {})) or ''
158
159 result_selection = data['form'].get('result_selection', '')
160 if result_selection == 'customer':
161 account_type = "('receivable')"
162 elif result_selection == 'supplier':
163 account_type = "('payable')"
164 else:
165 account_type = "('payable', 'receivable')"
166
167 move_state = "('draft','posted')"
168 if data['form'].get('target_move', 'all') == 'posted':
169 move_state = "('posted')"
170
171 query = "SELECT l.id FROM account_move_line l" \
172 " JOIN account_account ac ON (l.account_id = ac.id)" \
173 " JOIN account_move am ON (am.id = l.move_id) WHERE "
174 if employee_id:
175 query += "l.employee_id = " + str(employee_id) + "" \
176 " AND ac.type IN " + account_type + "" \
177 " AND am.state IN " + move_state + ""
178 else:
179 query += "ac.type IN " + account_type + "" \
180 " AND am.state IN " + move_state + ""
181
182 reconcile_filter = data['form'].get('reconciled', '')
183 if reconcile_filter == 'yes':
184 query += " AND l.reconcile_id IS NOT NULL"
185 elif reconcile_filter == 'no':
186 query += " AND l.reconcile_id IS NULL AND ac.reconcile='t'" # reconcilable entries not reconciled
187
188 if data['form'].get('instance_ids', False):
189 query += " AND l.instance_id in(%s)" % (",".join(map(str, data['form']['instance_ids'])))
190 if data['form'].get('account_ids', False): # some accounts are specifically selected
191 query += " AND ac.id IN (%s)" % (",".join(map(str, data['form']['account_ids'])))
192 if where:
193 query += " AND " + where + ""
194
195 cr.execute(query)
196 res = cr.fetchall()
197 if res:
198 res2 = []
199 for r in res:
200 res2.append(r[0])
201 self.move_line_ids['res'] = res2
202 else:
203 self.move_line_ids['res'] = False
204 self.move_line_ids['employee_id'] = employee_id
205 self.move_line_ids['data'] = data
206 return self.move_line_ids['res']
207
208 def _delete_previous_data(self, cr, uid, context=None):
209 """ delete older user request than 15 days"""
210 dt = datetime.datetime.now() - timedelta(days=15)
211 dt_orm = dt.strftime(self.pool.get('date.tools').get_db_datetime_format(cr, uid, context=context))
212 domain = [
213 ('uid', '=', uid),
214 ('build_ts', '<', dt_orm),
215 ]
216 ids = self.search(cr, uid, domain, context=context)
217 if ids:
218 if isinstance(ids, (int, long)):
219 ids = [ids]
220 self.unlink(cr, uid, ids, context=context)
221
222 def build_data(self, cr, uid, data, context=None):
223 """
224 data
225 {'model': 'ir.ui.menu', 'ids': [494], 'build_ts': build_timestamp,
226 'form': {
227 'display_employee': 'non-zero_balance', 'chart_account_id': 1,
228 'result_selection': 'customer', 'date_from': False,
229 'period_to': False,
230 'journal_ids': [16, 9, 10, 11, 12, 13, 14, 6, 7, 17, 18, 20, 15, 5, 1, 2, 3, 4, 8, 19],
231 'used_context': {
232 'chart_account_id': 1,
233 'journal_ids': [16, 9, 10, 11, 12, 13, 14, 6, 7, 17, 18, 20, 15, 5, 1, 2, 3, 4, 8, 19],
234 'fiscalyear': 1},
235 'filter': 'filter_no', 'period_from': False,
236 'fiscalyear_id': 1, 'periods': [], 'date_to': False, 'id': 1, 'target_move': 'posted'
237 }
238 }
239 """
240 if context is None:
241 context = {}
242 context['data'] = data
243 self._delete_previous_data(cr, uid, context=context)
244
245 res = self._execute_query_employees(cr, uid, data)
246
247 p_seen = {} # store every employee handled
248 for r in res:
249 debit = r['debit']
250 credit = r['credit']
251 if r['employee_id'] not in p_seen:
252 p_seen[r['employee_id']] = {}
253 p_seen[r['employee_id']]['name'] = r['employee_name']
254 p_seen[r['employee_id']]['employee_identification_id'] = r['employee_identification_id']
255 vals = {
256 'uid': uid,
257 'build_ts': data['build_ts'],
258 'employee_id': r['employee_id'],
259 'name': r['employee_name'],
260 'employee_identification_id': r['employee_identification_id'],
261 'debit': debit,
262 'credit': credit,
263 'balance': debit - credit,
264 }
265 self.create(cr, uid, vals, context=context)
266
267 # if "Display Employees: All employees" has been selected, add the employees without movements
268 # ONLY IF NO specific employee has been selected
269 if data['form'].get('display_employee', '') == 'all' and not data['form'].get('employee_ids', False):
270 # create entries at zero for employees where no result was found
271 active_selection = data['form'].get('only_active_employees') and ('t',) or ('t', 'f')
272 other_employees_sql_end = ""
273 other_employees_sql_end_params = []
274 if p_seen:
275 # exclude employees already found if any
276 other_employees_sql_end = " AND emp.id NOT IN %s "
277 other_employees_sql_end_params.append(tuple(p_seen.keys()))
278 other_employees_sql = """
279 SELECT emp.id , emp.identification_id, emp.name_resource
280 FROM hr_employee emp
281 INNER JOIN resource_resource res ON emp.resource_id = res.id
282 WHERE res.active IN %s """ + other_employees_sql_end + """ ;
283 """
284 other_employees_params = (active_selection,) + tuple(other_employees_sql_end_params)
285 cr.execute(other_employees_sql, other_employees_params) # not_a_user_entry
286 other_employees = cr.dictfetchall()
287 for employee in other_employees:
288 vals = {
289 'uid': uid,
290 'build_ts': data['build_ts'],
291 'employee_id': employee['id'],
292 'name': employee['name_resource'],
293 'employee_identification_id': employee['identification_id'] or '',
294 'debit': 0.0,
295 'credit': 0.0,
296 'balance': 0.0,
297 }
298 self.create(cr, uid, vals, context=context)
299
300 def open_journal_items(self, cr, uid, ids, context=None):
301 # get related employee
302 res = {}
303 if context is None:
304 context = {}
305 if ids:
306 if isinstance(ids, (int, long)):
307 ids = [ids]
308 r = self.read(cr, uid, ids, ['employee_id'], context=context)
309 if r and r[0] and r[0]['employee_id']:
310 if context and 'data' in context and 'form' in context['data']:
311 move_line_ids = self._execute_query_selected_employee_move_line_ids(
312 cr, uid,
313 r[0]['employee_id'][0],
314 context['data'])
315 if move_line_ids:
316 new_context = {}
317 if context:
318 ctx_key_2copy = ('lang', 'tz', 'department_id', 'client', 'name')
319 for k in ctx_key_2copy:
320 if k in context:
321 new_context[k] = context[k]
322 view_id = self.pool.get('ir.model.data').get_object_reference(
323 cr, uid, 'finance',
324 'view_account_employee_balance_tree_move_line_tree')[1]
325 res = {
326 'name': 'Journal Items',
327 'type': 'ir.actions.act_window',
328 'res_model': 'account.move.line',
329 'view_mode': 'tree,form',
330 'view_type': 'form',
331 'domain': [('id', 'in', tuple(move_line_ids))],
332 'context': new_context,
333 }
334 if view_id:
335 res['view_id'] = [view_id]
336 if not res:
337 raise osv.except_osv(_('Warning !'), _('No Journal Items to show.'))
338 return res
339
340 def get_employee_data(self, cr, uid, data, context=None):
341 """
342 Gets the "account_employee_balance_trees" which have just been created
343 """
344 domain = [
345 ('uid', '=', uid),
346 ('build_ts', '=', data['build_ts']),
347 ]
348 ids = self.search(cr, uid, domain, context=context, order='name, id')
349 if ids:
350 if isinstance(ids, (int, long)):
351 ids = [ids]
352 return self.browse(cr, uid, ids, context=context)
353 return []
354
355 def get_employee_account_move_lines_data(self, cr, uid, employee_id, data, context=None):
356 ids = self._execute_query_selected_employee_move_line_ids(cr, uid, employee_id, data)
357 if ids:
358 if isinstance(ids, (int, long)):
359 ids = [ids]
360 sql = """SELECT a.code as account, SUM(aml.debit) as deb, SUM(aml.credit) as cred, SUM(debit) - SUM(credit) as total
361 FROM account_move_line as aml, account_account as a
362 WHERE aml.id in %s
363 AND aml.account_id = a.id
364 GROUP BY a.code"""
365 cr.execute(sql, (tuple(ids), ))
366 res = cr.dictfetchall()
367 return res
368 return []
369
370 def get_lines_per_currency(self, cr, uid, employee_id, data, account_code):
371 """
372 Returns a list of dicts, each containing the subtotal per currency for the given employee and account
373 """
374 res = []
375 if employee_id and data and account_code:
376 # the subtotal lines for the selected employee must be limited to the ids corresponding to
377 # the criteria selected in the wizard
378 ids = self._execute_query_selected_employee_move_line_ids(cr, uid, employee_id, data)
379 if ids:
380 sql = """SELECT c.name as currency_booking,
381 SUM(aml.debit_currency) as debit_booking, SUM(aml.credit_currency) as credit_booking,
382 SUM(debit_currency) - SUM(credit_currency) as total_booking,
383 SUM(aml.debit) - SUM(aml.credit) as total_functional
384 FROM account_move_line AS aml
385 INNER JOIN account_account AS a ON aml.account_id = a.id
386 INNER JOIN res_currency AS c ON aml.currency_id = c.id
387 WHERE aml.id in %s
388 AND a.code = %s
389 GROUP BY a.code, c.name
390 ORDER BY c.name;"""
391 cr.execute(sql, (tuple(ids), account_code))
392 res = cr.dictfetchall()
393 return res
394
395 def get_employees_total_debit_credit_balance(self, cr, uid, data):
396 """Compute all employees total debit/credit from self data
397 return total_debit, total_credit (tuple)
398 """
399 # recalculate the result only if the criteria have changed
400 if not self.total_debit_credit_balance or data != self.total_debit_credit_balance['data']:
401 query = """SELECT sum(debit) AS debit, sum(credit) AS credit, sum(balance) as balance
402 FROM account_employee_balance_tree
403 WHERE uid = %s
404 AND build_ts = %s;
405 """
406 cr.execute(query, (uid, data['build_ts']))
407 res = cr.dictfetchall()
408 self.total_debit_credit_balance['data'] = data
409 self.total_debit_credit_balance['res'] = res[0]['debit'], res[0]['credit'], res[0]['balance']
410 return self.total_debit_credit_balance['res']
411
412
413account_employee_balance_tree()
414
415
416class wizard_account_employee_balance_tree(osv.osv_memory):
417 """
418 This wizard will provide the employee balance report by periods, between any two dates.
419 """
420 _inherit = 'account.common.employee.report'
421 _name = 'wizard.account.employee.balance.tree'
422 _description = 'Print Account Employee Balance View'
423
424 def get_payment_methods(self, cr, uid, context):
425 return self.pool.get('account.employee.ledger').get_payment_methods(cr, uid, context)
426
427 def get_employee_type(self, cr, uid, context):
428 return self.pool.get('account.employee.ledger').get_employee_type(cr, uid, context)
429
430 _columns = {
431 'display_employee': fields.selection([('all', 'All Employees'),
432 ('with_movements', 'With movements'),
433 ('non-zero_balance', 'With balance is not equal to 0')],
434 string='Display Employees', required=True),
435 'instance_ids': fields.many2many('msf.instance', 'account_report_general_ledger_instance_rel', 'instance_id',
436 'argl_id', 'Proprietary Instances'),
437 'employee_ids': fields.many2many('hr.employee', 'account_employee_balance_employee_rel', 'wizard_id',
438 'employee_id', string='Employees',
439 help='Display the report for specific employees only'),
440 'only_active_employees': fields.boolean('Only active employees',
441 help='Display the report for active employees only'),
442 'account_ids': fields.many2many('account.account', 'account_employee_balance_account_rel', 'wizard_id',
443 'account_id', string='Accounts',
444 help='Display the report for specific accounts only'),
445 'reconciled': fields.selection([
446 ('empty', ''),
447 ('yes', 'Yes'),
448 ('no', 'No'),
449 ], string='Reconciled'),
450 'employee_type': fields.selection(get_employee_type, string='Employee Type', required=False),
451 'payment_method': fields.selection(get_payment_methods, string='Method of Payment', required=False),
452 }
453
454 def _get_journals(self, cr, uid, context=None):
455 """exclude extra-accounting journals from this report (IKD, ODX)."""
456 domain = [('type', 'not in', ['inkind', 'extra'])]
457 return self.pool.get('account.journal').search(cr, uid, domain, context=context)
458
459 _defaults = {
460 'display_employee': 'with_movements',
461 'result_selection': 'customer_supplier',
462 'account_domain': "[('type', 'in', ['payable', 'receivable'])]",
463 'journal_ids': _get_journals,
464 'only_active_employees': False,
465 'reconciled': 'empty',
466 'fiscalyear_id': False,
467 'employee_type': '',
468 'payment_method': 'blank',
469 }
470
471 def _get_data(self, cr, uid, ids, context=None):
472 if context is None:
473 context = {}
474
475 data = {}
476 data['keep_open'] = 1
477 data['ids'] = context.get('active_ids', [])
478 data['model'] = context.get('active_model', 'ir.ui.menu')
479 data['build_ts'] = datetime.datetime.now().strftime(self.pool.get('date.tools').get_db_datetime_format(cr, uid, context=context))
480 data['form'] = self.read(cr, uid, ids, ['date_from', 'date_to', 'fiscalyear_id', 'journal_ids', 'period_from',
481 'period_to', 'filter', 'chart_account_id', 'target_move', 'display_employee',
482 'instance_ids', 'employee_ids', 'employee_type', 'payment_method',
483 'only_active_employees', 'account_ids', 'reconciled'])[0]
484 if not data['form']['employee_type']:
485 data['form']['employee_type'] = ''
486 if data['form']['journal_ids']:
487 default_journals = self._get_journals(cr, uid, context=context)
488 if default_journals:
489 if len(default_journals) == len(data['form']['journal_ids']):
490 data['form']['all_journals'] = True
491 used_context = self._build_contexts(cr, uid, ids, data, context=context)
492 data['form']['periods'] = used_context.get('periods', False) and used_context['periods'] or []
493 data['form']['used_context'] = used_context
494
495 data = self.pre_print_report(cr, uid, ids, data, context=context)
496 return data
497
498 def show(self, cr, buid, ids, context=None):
499 uid = hasattr(buid, 'realUid') and buid.realUid or buid
500 data = self._get_data(cr, uid, ids, context=context)
501 self.pool.get('account.employee.balance.tree').build_data(cr, uid, data, context=context)
502 self._check_dates_fy_consistency(cr, uid, data, context)
503 return {
504 'type': 'ir.actions.act_window',
505 'name': _('Employee Balance'),
506 'res_model': 'account.employee.balance.tree',
507 'view_type': 'form',
508 'view_mode': 'tree,form',
509 'keep_open': 1,
510 'ref': 'view_account_employee_balance_tree',
511 'domain': [
512 ('uid', '=', uid),
513 ('build_ts', '=', data['build_ts']),
514 ],
515 'context': context,
516 }
517
518 def print_pdf(self, cr, buid, ids, context=None):
519 if context is None:
520 context = {}
521 uid = hasattr(buid, 'realUid') and buid.realUid or buid
522 data = self._get_data(cr, uid, ids, context=context)
523 self._check_dates_fy_consistency(cr, uid, data, context)
524 self.pool.get('account.employee.balance.tree').build_data(cr, uid, data, context=context)
525 return {
526 'type': 'ir.actions.report.xml',
527 'report_name': 'account.employee.balance',
528 'datas': data,
529 }
530
531 def print_xls(self, cr, buid, ids, context=None):
532 if context is None:
533 context = {}
534 uid = hasattr(buid, 'realUid') and buid.realUid or buid
535 data = self._get_data(cr, uid, ids, context=context)
536 self._check_dates_fy_consistency(cr, uid, data, context)
537 self.pool.get('account.employee.balance.tree').build_data(cr, uid, data, context=context)
538 return {
539 'type': 'ir.actions.report.xml',
540 'report_name': 'account.employee.balance.tree_xls',
541 'datas': data,
542 }
543
544 def remove_journals(self, cr, uid, ids, context=None):
545 if ids:
546 self.write(cr, uid, ids, {'journal_ids': [(6, 0, [])]},
547 context=context)
548 return {}
549
550
551wizard_account_employee_balance_tree()
552
553# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
0554
=== added file 'bin/addons/finance/wizard/account_report_employee_balance_tree_view.xml'
--- bin/addons/finance/wizard/account_report_employee_balance_tree_view.xml 1970-01-01 00:00:00 +0000
+++ bin/addons/finance/wizard/account_report_employee_balance_tree_view.xml 2022-06-01 15:15:45 +0000
@@ -0,0 +1,177 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record model="ir.ui.view" id="view_account_employee_balance_search" >
6 <field name="name">account.employee.balance.tree.search</field>
7 <field name="model">account.employee.balance.tree</field>
8 <field name="type">search</field>
9 <field name="arch" type="xml">
10 <search string="Employee Balance Search">
11 <field name="employee_id" string="Employee" />
12 </search>
13 </field>
14 </record>
15
16 <record model="ir.ui.view" id="view_account_employee_balance_tree">
17 <field name="name">account.employee.balance.tree.view</field>
18 <field name="model">account.employee.balance.tree</field>
19 <field name="type">tree</field>
20 <field name="priority" eval="300"/>
21 <field name="arch" type="xml">
22 <tree string="Employee Balance View"
23 editable="top" noteditable="1"
24 hide_new_button="1" hide_delete_button="1">
25 <button
26 name="open_journal_items"
27 string="Open journal items"
28 type="object"
29 icon="terp-gtk-go-back-rtl"
30 />
31 <field name="employee_id" invisible="1"/>
32 <field name="name"/>
33 <field name="debit" sum="Debit" />
34 <field name="credit" sum="Credit" />
35 <field name="balance" sum="Balance" />
36 </tree>
37 </field>
38 </record>
39
40 <!-- journal items from view_account_employee_balance_tree !-->
41 <record model="ir.ui.view" id="view_account_employee_balance_tree_move_line_tree">
42 <field name="name">account.move.line.tree</field>
43 <field name="model">account.move.line</field>
44 <field name="type">tree</field>
45 <field name="priority" eval="301"/>
46 <field name="arch" type="xml">
47 <tree string="Account Entry Line" editable="bottom" noteditable="1" colors="red:state in ('draft');black:state in ('valid')" hide_new_button="1">
48 <field name="journal_id"/>
49 <field name="move_id"/>
50 <!--
51 <field name="name"/>
52 <field name="ref"/>
53 -->
54 <field name="document_date"/>
55 <field name="date"/>
56 <field name="period_id" domain="[('state','=','draft')]"/>
57 <field name="account_id"/>
58 <field name="move_state" invisible="1"/>
59 <field name="partner_id" invisible="1"/>
60 <field name="employee_id" invisible="1"/>
61 <field name="transfer_journal_id" invisible="1"/>
62 <field name="partner_txt" invisible="1"/>
63 <field name="partner_type"/>
64 <field name="debit_currency" sum="Total Book. Debit"/>
65 <field name="credit_currency" sum="Total Book. Credit"/>
66 <field name="currency_id"/>
67 <field name="debit" sum="Total Func. Debit"/>
68 <field name="credit" sum="Total Func. Credit"/>
69 <field name="output_amount_debit" invisible="1" />
70 <field name="output_amount_credit" invisible="1" />
71 <field name="functional_currency_id"/>
72 <field name="reconcile_txt"/>
73 <field name="state"/>
74 </tree>
75 </field>
76 </record>
77
78 <record id="wizard_account_report_employee_balance_tree_view" model="ir.ui.view">
79 <field name="name">Employee Balance View</field>
80 <field name="model">wizard.account.employee.balance.tree</field>
81 <field name="type">form</field>
82 <field name="inherit_id" ref="account.account_common_report_view" />
83 <field name="arch" type="xml">
84 <data>
85 <xpath expr="/form/label[@string='']" position="replace">
86 <separator string="Employee Balance Tree" colspan="4"/>
87 </xpath>
88 <xpath expr="//field[@name='target_move']" position="after">
89 <field name="result_selection" on_change="onchange_result_selection(result_selection)"/>
90 <field name="display_employee"/>
91 <field name="reconciled"/>
92 <field name="only_active_employees"/>
93 <field name="employee_type" on_change="onchange_employee_type(employee_type)"/>
94 <field name="payment_method" on_change="onchange_payment_method(payment_method)"/>
95 <field name="instance_ids" domain="[('instance_to_display_ids','=',True)]">
96 <tree noteditable="1" editable="top" string="Proprietary Instances">
97 <field name="code" />
98 <field name="name" />
99 </tree>
100 </field>
101 <field name="employee_ids" >
102 <tree noteditable="1">
103 <field name="name_resource"/>
104 <field name="identification_id"/>
105 <field name="employee_type"/>
106 </tree>
107 </field>
108 <field name="account_domain" invisible="1"/>
109 <field name="account_ids" domain="account_domain">
110 <tree noteditable="1">
111 <field name="code"/>
112 <field name="name"/>
113 </tree>
114 </field>
115 </xpath>
116 <xpath expr="//field[@name='fiscalyear_id']" position="attributes">
117 <attribute name="on_change">onchange_fiscalyear(fiscalyear_id)</attribute>
118 </xpath>
119 <xpath expr="//field[@name='period_from']" position="attributes">
120 <attribute name="domain">[]</attribute>
121 </xpath>
122 <xpath expr="//field[@name='period_to']" position="attributes">
123 <attribute name="domain">[]</attribute>
124 </xpath>
125
126 <xpath expr="//group[1]" position="replace">
127 <group col="4" colspan="4">
128 <button icon="gtk-cancel" special="cancel" string="Cancel" colspan="2"/>
129 <button icon="terp-gtk-go-back-rtl" name="show" string="Balance View" type="object" colspan="2" default_focus="1" />
130 <button icon="gtk-print" name="print_pdf" string="Print PDF" type="object" colspan="2" />
131 <button icon="gtk-print" name="print_xls" string="Print Excel" type="object" colspan="2" />
132 </group>
133 </xpath>
134
135 <xpath expr="//field[@name='journal_ids']" position="replace">
136 <group col="4" colspan="4">
137 <button name="remove_journals" string="Remove all journals" type="object" colspan="1" />
138 <label string="" colspan="3" />
139 <!-- exclude extra-accounting journals from this report (IKD, ODX). -->
140 <field name="journal_ids" colspan="4" nolabel="1" noteditable="1"
141 domain="[('type', 'not in', ['inkind', 'extra'])]">
142 <tree noteditable="1" editable="top" string="Account Journal" colors="red:is_active==False;black:is_active==True">
143 <field name="is_active" invisible="1" />
144 <field name="instance_id" />
145 <field name="code" />
146 <field name="name" />
147 <field name="type" />
148 </tree>
149 </field>
150 </group>
151 </xpath>
152
153 </data>
154 </field>
155 </record>
156
157 <record id="action_account_employee_balance_tree" model="ir.actions.act_window">
158 <field name="name">Employee Balance View</field>
159 <field name="res_model">wizard.account.employee.balance.tree</field>
160 <field name="type">ir.actions.act_window</field>
161 <field name="view_type">form</field>
162 <field name="view_mode">form</field>
163 <field name="view_id" ref="wizard_account_report_employee_balance_tree_view"/>
164 <field name="context">{'record_id': active_id}</field>
165 <field name="target">new</field>
166 </record>
167
168
169 <menuitem icon="STOCK_PRINT"
170 name="Employee Balance"
171 action="action_account_employee_balance_tree"
172 id="menu_account_employee_balance_tree"
173 parent="account.employee_menu"
174 sequence="2000" />
175
176 </data>
177 </openerp>
0178
=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
--- bin/addons/msf_profile/i18n/fr_MF.po 2022-05-25 14:15:34 +0000
+++ bin/addons/msf_profile/i18n/fr_MF.po 2022-06-01 15:15:45 +0000
@@ -1938,6 +1938,9 @@
1938#: report:account.third_party_ledger:01938#: report:account.third_party_ledger:0
1939#: report:account.third_party_ledger_other:01939#: report:account.third_party_ledger_other:0
1940#: report:addons/account/report/account_partner_ledger.mako:2781940#: report:addons/account/report/account_partner_ledger.mako:278
1941#: report:account.employee_ledger:0
1942#: report:account.employee_ledger_other:0
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches