Merge lp:~mukunde/unifield-server/US-6392 into lp:unifield-server
- US-6392
- Merge into trunk
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+422841@code.launchpad.net |
Commit message
Description of the change
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
1 | === modified file 'bin/addons/account/__openerp__.py' | |||
2 | --- bin/addons/account/__openerp__.py 2020-04-16 14:07:13 +0000 | |||
3 | +++ bin/addons/account/__openerp__.py 2022-06-01 15:15:45 +0000 | |||
4 | @@ -112,6 +112,7 @@ | |||
5 | 112 | "wizard/account_report_profit_loss_view.xml", | 112 | "wizard/account_report_profit_loss_view.xml", |
6 | 113 | "wizard/account_report_balance_sheet_view.xml", | 113 | "wizard/account_report_balance_sheet_view.xml", |
7 | 114 | "wizard/account_report_liquidity_balance_view.xml", | 114 | "wizard/account_report_liquidity_balance_view.xml", |
8 | 115 | "wizard/account_report_employee_ledger_view.xml", | ||
9 | 115 | ], | 116 | ], |
10 | 116 | 'demo_xml': [ | 117 | 'demo_xml': [ |
11 | 117 | 'account_demo.xml', | 118 | 'account_demo.xml', |
12 | 118 | 119 | ||
13 | === modified file 'bin/addons/account/account_menuitem.xml' | |||
14 | --- bin/addons/account/account_menuitem.xml 2021-10-14 12:15:46 +0000 | |||
15 | +++ bin/addons/account/account_menuitem.xml 2022-06-01 15:15:45 +0000 | |||
16 | @@ -52,6 +52,7 @@ | |||
17 | 52 | groups="group_account_user,group_account_manager" | 52 | groups="group_account_user,group_account_manager" |
18 | 53 | name="Journals"/> | 53 | name="Journals"/> |
19 | 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"/> |
20 | 55 | <menuitem id="employee_menu" name="Employees" parent="final_accounting_reports" sequence="130"/> | ||
21 | 55 | 56 | ||
22 | 56 | </data> | 57 | </data> |
23 | 57 | </openerp> | 58 | </openerp> |
24 | 58 | 59 | ||
25 | === modified file 'bin/addons/account/account_report.xml' | |||
26 | --- bin/addons/account/account_report.xml 2020-04-22 09:04:55 +0000 | |||
27 | +++ bin/addons/account/account_report.xml 2022-06-01 15:15:45 +0000 | |||
28 | @@ -36,6 +36,25 @@ | |||
29 | 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('/',''))" |
30 | 37 | attachment_use="1" | 37 | attachment_use="1" |
31 | 38 | multi="True"/> | 38 | multi="True"/> |
32 | 39 | |||
33 | 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" /> | ||
34 | 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"/> | ||
35 | 42 | |||
36 | 43 | <report id="account_employee_ledger_xls" | ||
37 | 44 | auto="False" | ||
38 | 45 | menu="False" | ||
39 | 46 | header="False" | ||
40 | 47 | model="account.account" | ||
41 | 48 | name="account.employee_ledger_xls" | ||
42 | 49 | file="account/report/account_employee_ledger.mako" | ||
43 | 50 | report_type="webkit" | ||
44 | 51 | target_filename="Employee Ledger_%(instance_code)s_%(year)s%(month)s%(day)s" | ||
45 | 52 | string="Employee Ledger xls"/> | ||
46 | 53 | |||
47 | 54 | <report auto="False" id="account_employee_account_balance" menu="False" model="account.employee.balance.tree" | ||
48 | 55 | name="account.employee.balance" rml="account/report/account_employee_balance.rml" | ||
49 | 56 | string="Employee Balance" target_filename="Employee Balance_%(instance_code)s_%(year)s%(month)s%(day)s" /> | ||
50 | 57 | |||
51 | 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"/> |
52 | 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"/> |
53 | 41 | 60 | ||
54 | 42 | 61 | ||
55 | === modified file 'bin/addons/account/report/__init__.py' | |||
56 | --- bin/addons/account/report/__init__.py 2020-04-14 13:50:39 +0000 | |||
57 | +++ bin/addons/account/report/__init__.py 2022-06-01 15:15:45 +0000 | |||
58 | @@ -44,6 +44,7 @@ | |||
59 | 44 | import free_allocation_report | 44 | import free_allocation_report |
60 | 45 | import invoice_excel_export | 45 | import invoice_excel_export |
61 | 46 | import export_invoice | 46 | import export_invoice |
62 | 47 | import account_employee_ledger | ||
63 | 47 | 48 | ||
64 | 48 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 49 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
65 | 49 | 50 | ||
66 | 50 | 51 | ||
67 | === added file 'bin/addons/account/report/account_employee_balance.rml' | |||
68 | --- bin/addons/account/report/account_employee_balance.rml 1970-01-01 00:00:00 +0000 | |||
69 | +++ bin/addons/account/report/account_employee_balance.rml 2022-06-01 15:15:45 +0000 | |||
70 | @@ -0,0 +1,360 @@ | |||
71 | 1 | <?xml version="1.0"?> | ||
72 | 2 | <document filename="Employee Balance.pdf"> | ||
73 | 3 | <template pageSize="(595.0,842.0)" title="Employee Balance" author="Tempo Consulting" allowSplitting="20"> | ||
74 | 4 | <pageTemplate id="first"> | ||
75 | 5 | <frame id="first" x1="57.0" y1="57.0" width="481" height="728"/> | ||
76 | 6 | </pageTemplate> | ||
77 | 7 | </template> | ||
78 | 8 | <stylesheet> | ||
79 | 9 | <blockTableStyle id="Standard_Outline"> | ||
80 | 10 | <blockAlignment value="LEFT"/> | ||
81 | 11 | <blockValign value="TOP"/> | ||
82 | 12 | </blockTableStyle> | ||
83 | 13 | <blockTableStyle id="Table1"> | ||
84 | 14 | <blockAlignment value="LEFT"/> | ||
85 | 15 | <blockValign value="TOP"/> | ||
86 | 16 | <blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
87 | 17 | <blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
88 | 18 | <blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/> | ||
89 | 19 | <blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/> | ||
90 | 20 | <blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/> | ||
91 | 21 | <blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/> | ||
92 | 22 | </blockTableStyle> | ||
93 | 23 | <blockTableStyle id="Table6"> | ||
94 | 24 | <blockAlignment value="LEFT"/> | ||
95 | 25 | <blockValign value="TOP"/> | ||
96 | 26 | <lineStyle kind="GRID" colorName="black"/> | ||
97 | 27 | </blockTableStyle> | ||
98 | 28 | <blockTableStyle id="Table_Company_Name"> | ||
99 | 29 | <blockAlignment value="LEFT"/> | ||
100 | 30 | <blockValign value="TOP"/> | ||
101 | 31 | </blockTableStyle> | ||
102 | 32 | <blockTableStyle id="Table2"> | ||
103 | 33 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/> | ||
104 | 34 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/> | ||
105 | 35 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,2" stop="-1,2"/> | ||
106 | 36 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,3" stop="-1,-1"/> | ||
107 | 37 | <blockValign value="TOP"/> | ||
108 | 38 | <blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/> | ||
109 | 39 | </blockTableStyle> | ||
110 | 40 | <blockTableStyle id="Table3"> | ||
111 | 41 | <blockAlignment value="LEFT"/> | ||
112 | 42 | <blockValign value="TOP"/> | ||
113 | 43 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/> | ||
114 | 44 | </blockTableStyle> | ||
115 | 45 | <blockTableStyle id="Table4"> | ||
116 | 46 | <blockAlignment value="LEFT"/> | ||
117 | 47 | <blockValign value="TOP"/> | ||
118 | 48 | <lineStyle kind="GRID" colorName="black"/> | ||
119 | 49 | </blockTableStyle> | ||
120 | 50 | <blockTableStyle id="Tableau3"> | ||
121 | 51 | <blockAlignment value="LEFT"/> | ||
122 | 52 | <blockValign value="TOP"/> | ||
123 | 53 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" /> | ||
124 | 54 | <lineStyle kind="OUTLINE" colorName="#e6e6e6" /> | ||
125 | 55 | <blockBackground colorName="white" start="0,0" stop="-1,0"/> | ||
126 | 56 | </blockTableStyle> | ||
127 | 57 | <blockTableStyle id="Table_Sub_Header_Content"> | ||
128 | 58 | <blockAlignment value="LEFT"/> | ||
129 | 59 | <blockValign value="TOP"/> | ||
130 | 60 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/> | ||
131 | 61 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/> | ||
132 | 62 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/> | ||
133 | 63 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/> | ||
134 | 64 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/> | ||
135 | 65 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/> | ||
136 | 66 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/> | ||
137 | 67 | <lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/> | ||
138 | 68 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/> | ||
139 | 69 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/> | ||
140 | 70 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/> | ||
141 | 71 | <lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/> | ||
142 | 72 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/> | ||
143 | 73 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/> | ||
144 | 74 | <lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/> | ||
145 | 75 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/> | ||
146 | 76 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/> | ||
147 | 77 | <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/> | ||
148 | 78 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/> | ||
149 | 79 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/> | ||
150 | 80 | </blockTableStyle> | ||
151 | 81 | <blockTableStyle id="Table2_header"> | ||
152 | 82 | <blockAlignment value="LEFT"/> | ||
153 | 83 | <blockValign value="TOP"/> | ||
154 | 84 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/> | ||
155 | 85 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/> | ||
156 | 86 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/> | ||
157 | 87 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/> | ||
158 | 88 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/> | ||
159 | 89 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/> | ||
160 | 90 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/> | ||
161 | 91 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/> | ||
162 | 92 | <lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/> | ||
163 | 93 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/> | ||
164 | 94 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/> | ||
165 | 95 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/> | ||
166 | 96 | <lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/> | ||
167 | 97 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/> | ||
168 | 98 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/> | ||
169 | 99 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/> | ||
170 | 100 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/> | ||
171 | 101 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/> | ||
172 | 102 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="5,0" stop="5,-1"/> | ||
173 | 103 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/> | ||
174 | 104 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/> | ||
175 | 105 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="6,0" stop="6,-1"/> | ||
176 | 106 | <lineStyle kind="LINEAFTER" colorName="#cccccc" start="6,0" stop="6,-1"/> | ||
177 | 107 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="6,0" stop="6,0"/> | ||
178 | 108 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/> | ||
179 | 109 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="7,0" stop="7,-1"/> | ||
180 | 110 | <lineStyle kind="LINEAFTER" colorName="#cccccc" start="7,0" stop="7,-1"/> | ||
181 | 111 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="7,0" stop="7,0"/> | ||
182 | 112 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/> | ||
183 | 113 | </blockTableStyle> | ||
184 | 114 | |||
185 | 115 | <blockTableStyle id="Table_Subheader_Content_detail"> | ||
186 | 116 | <blockAlignment value="LEFT"/> | ||
187 | 117 | <blockValign value="TOP"/> | ||
188 | 118 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/> | ||
189 | 119 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/> | ||
190 | 120 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/> | ||
191 | 121 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/> | ||
192 | 122 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/> | ||
193 | 123 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/> | ||
194 | 124 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/> | ||
195 | 125 | <lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/> | ||
196 | 126 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/> | ||
197 | 127 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/> | ||
198 | 128 | <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/> | ||
199 | 129 | <lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/> | ||
200 | 130 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/> | ||
201 | 131 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/> | ||
202 | 132 | <lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/> | ||
203 | 133 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/> | ||
204 | 134 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/> | ||
205 | 135 | <lineStyle kind="LINEAFTER" colorName="#cccccc" start="5,0" stop="5,-1"/> | ||
206 | 136 | <lineStyle kind="LINEABOVE" colorName="#cccccc" start="5,0" stop="5,0"/> | ||
207 | 137 | <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/> | ||
208 | 138 | </blockTableStyle> | ||
209 | 139 | |||
210 | 140 | <initialize> | ||
211 | 141 | <paraStyle name="all" alignment="justify"/> | ||
212 | 142 | </initialize> | ||
213 | 143 | |||
214 | 144 | <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/> | ||
215 | 145 | <paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/> | ||
216 | 146 | <paraStyle name="P4Bold" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/> | ||
217 | 147 | <paraStyle name="P5" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> | ||
218 | 148 | <paraStyle name="P6" fontName="Helvetica" fontSize="11.0" leading="12" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/> | ||
219 | 149 | <paraStyle name="P7" fontName="Helvetica-Bold" fontSize="9" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/> | ||
220 | 150 | <paraStyle name="P8" fontName="Helvetica-Bold" fontSize="9" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/> | ||
221 | 151 | <paraStyle name="P9" fontName="Helvetica" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/> | ||
222 | 152 | <paraStyle name="P9b" fontName="Helvetica-Bold" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/> | ||
223 | 153 | <paraStyle name="P10" fontName="Helvetica" alignment="CENTER"/> | ||
224 | 154 | <paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="10"/> | ||
225 | 155 | <paraStyle name="P12" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> | ||
226 | 156 | <paraStyle name="P12a" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
227 | 157 | <paraStyle name="P12b" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/> | ||
228 | 158 | <paraStyle name="P13" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/> | ||
229 | 159 | <paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Times-Bold" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/> | ||
230 | 160 | <paraStyle name="P15" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/> | ||
231 | 161 | <paraStyle name="Standard" fontName="Helvetica"/> | ||
232 | 162 | <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> | ||
233 | 163 | <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
234 | 164 | <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> | ||
235 | 165 | <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> | ||
236 | 166 | <paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> | ||
237 | 167 | <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> | ||
238 | 168 | <paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="11" spaceBefore="6.0" spaceAfter="6.0"/> | ||
239 | 169 | <paraStyle name="Index" fontName="Helvetica"/> | ||
240 | 170 | <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
241 | 171 | <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
242 | 172 | <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> | ||
243 | 173 | <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> | ||
244 | 174 | </stylesheet> | ||
245 | 175 | |||
246 | 176 | <story> | ||
247 | 177 | <blockTable colWidths="539.0" style="Table_Company_Name"> | ||
248 | 178 | <tr> | ||
249 | 179 | <td> | ||
250 | 180 | <para style="terp_header_Centre">Employee Balance</para> | ||
251 | 181 | </td> | ||
252 | 182 | </tr> | ||
253 | 183 | </blockTable> | ||
254 | 184 | <para style="terp_default_8"> | ||
255 | 185 | <font color="white"> </font> | ||
256 | 186 | </para> | ||
257 | 187 | <section> | ||
258 | 188 | [[ repeatIn(get_employees(data), 'p_entries') ]] | ||
259 | 189 | <!-- NOTE: if this HEADER has to be modified: modify also the "no data" version (below) --> | ||
260 | 190 | <blockTable colWidths="50.0,37.0,81.0,50.0,91.0,118.0,90.0,43.0" style="Table2_header"> | ||
261 | 191 | <tr> | ||
262 | 192 | <td><para style="terp_tblheader_General_Centre">Chart of Account</para></td> | ||
263 | 193 | <td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td> | ||
264 | 194 | <td><para style="terp_tblheader_General_Centre">Journals</para></td> | ||
265 | 195 | <td><para style="terp_tblheader_General_Centre">Accounts</para></td> | ||
266 | 196 | <td><para style="terp_tblheader_General_Centre">Proprietary Instances</para></td> | ||
267 | 197 | <td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!=translate('No Filter') and get_filter(data) ]]</para></td> | ||
268 | 198 | <td><para style="terp_tblheader_General_Centre">Display</para></td> | ||
269 | 199 | <td><para style="terp_tblheader_General_Centre">Func. Currency</para></td> | ||
270 | 200 | </tr> | ||
271 | 201 | <tr> | ||
272 | 202 | <td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td> | ||
273 | 203 | <td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td> | ||
274 | 204 | <td> <para style="terp_default_Centre_8">[[ get_journals_str(data) ]] </para></td> | ||
275 | 205 | <td><para style="terp_default_Centre_8">[[ get_accounts_str(data) ]]</para></td> | ||
276 | 206 | <td><para style="terp_default_Centre_8">[[ get_prop_instances_str(data, pdf=True) ]]</para></td> | ||
277 | 207 | |||
278 | 208 | <td><para style="terp_default_Centre_8">[[ get_filter(data)==translate('No Filter') and get_filter(data) or removeParentNode('para') ]] </para> | ||
279 | 209 | <blockTable colWidths="55.0,55.0" style="Table3">[[ get_filter(data)==translate('Date') or removeParentNode('blockTable') ]] | ||
280 | 210 | <tr> | ||
281 | 211 | <td><para style="terp_tblheader_General_Centre">Start Date</para></td> | ||
282 | 212 | <td><para style="terp_tblheader_General_Centre">End Date</para></td> | ||
283 | 213 | </tr> | ||
284 | 214 | <tr> | ||
285 | 215 | <td><para style="terp_default_Centre_8">[[ formatLang(get_start_date(data),date=True) ]]</para></td> | ||
286 | 216 | <td><para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</para></td> | ||
287 | 217 | </tr> | ||
288 | 218 | </blockTable> | ||
289 | 219 | <blockTable colWidths="55.0,55.0" style="Table3">[[ get_filter(data)==translate('Periods') or removeParentNode('blockTable') ]] | ||
290 | 220 | <tr> | ||
291 | 221 | <td><para style="terp_tblheader_General_Centre">Start Period</para></td> | ||
292 | 222 | <td><para style="terp_tblheader_General_Centre">End Period</para></td> | ||
293 | 223 | </tr> | ||
294 | 224 | <tr> | ||
295 | 225 | <td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td> | ||
296 | 226 | <td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td> | ||
297 | 227 | </tr> | ||
298 | 228 | </blockTable> | ||
299 | 229 | </td> | ||
300 | 230 | <td> | ||
301 | 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> | ||
302 | 232 | </td> | ||
303 | 233 | <td> | ||
304 | 234 | <para style="terp_default_Centre_8">[[ company.currency_id.name ]]</para> | ||
305 | 235 | </td> | ||
306 | 236 | </tr> | ||
307 | 237 | </blockTable> | ||
308 | 238 | |||
309 | 239 | <para style="terp_default_8"> | ||
310 | 240 | <font color="white"> </font> | ||
311 | 241 | </para> | ||
312 | 242 | <blockTable colWidths="140.0,55.0,75.0,65.0,70.0,70.0,69.0" repeatRows="1" style="Table2"> | ||
313 | 243 | <tr> | ||
314 | 244 | <td><para style="P12a">Employee</para></td> | ||
315 | 245 | <td><para style="P12b">Account</para></td> | ||
316 | 246 | <td><para style="P12b">Currency</para></td> | ||
317 | 247 | <td><para style="P12b">Debit</para></td> | ||
318 | 248 | <td><para style="P12b">Credit</para></td> | ||
319 | 249 | <td><para style="P12b">Booking Balance</para></td> | ||
320 | 250 | <td><para style="P12b">Balance [[ company.currency_id.name ]]</para></td> | ||
321 | 251 | </tr> | ||
322 | 252 | <tr> | ||
323 | 253 | <td><para style="P7">TOTAL EMPLOYEES:</para></td> | ||
324 | 254 | <td><para style="P8"></para></td> | ||
325 | 255 | <td><para style="P8"><u>[[ company.currency_id.name ]]</u></para></td> | ||
326 | 256 | <td><para style="P8"><u>[[ formatLang(get_employees_total_debit_credit_balance(data)[0] or 0.0) ]]</u></para></td> | ||
327 | 257 | <td><para style="P8"><u>[[ formatLang(get_employees_total_debit_credit_balance(data)[1] or 0.0) ]]</u></para></td> | ||
328 | 258 | <td><para style="P10">-</para></td> | ||
329 | 259 | <td><para style="P8"><u>[[ formatLang(get_employees_total_debit_credit_balance(data)[2] or 0.0) ]]</u></para></td> | ||
330 | 260 | </tr> | ||
331 | 261 | <tr> | ||
332 | 262 | [[ repeatIn(p_entries, 'p_obj') ]] | ||
333 | 263 | <!-- For each employee: show one header line and the detail per account --> | ||
334 | 264 | <td> | ||
335 | 265 | <blockTable colWidths="135.0,69.0,60.0,63.0,71.0,68.0,68.0"> | ||
336 | 266 | <tr> | ||
337 | 267 | <td><para style="P15">[[ p_obj.name or '' ]]</para></td> | ||
338 | 268 | <td><para style="P15"></para></td> | ||
339 | 269 | <td><para style="P4Bold">[[ company.currency_id.name ]]</para></td> | ||
340 | 270 | <td><para style="P4Bold" fontSize="8.5">[[ formatLang(p_obj.debit or 0.0) ]]</para></td> | ||
341 | 271 | <td><para style="P4Bold" fontSize="8.5">[[ formatLang(p_obj.credit or 0.0) ]]</para></td> | ||
342 | 272 | <td><para style="P4Bold" fontSize="8.5">[[ formatLang(p_obj.balance or 0.0) ]]</para></td> | ||
343 | 273 | <td><para style="P4Bold" fontSize="8.5">[[ formatLang(p_obj.balance or 0.0) ]]</para></td> | ||
344 | 274 | </tr> | ||
345 | 275 | <tr> | ||
346 | 276 | [[ repeatIn(get_employee_account_move_lines(p_obj.employee_id.id, data), 'aml') ]] | ||
347 | 277 | <!-- For each account: display one line with the total in functional currency, | ||
348 | 278 | and one line per booking currency used --> | ||
349 | 279 | <td> | ||
350 | 280 | <blockTable colWidths="151.0,28.0,79.0,64.0,72.0,67.0,67.0"> | ||
351 | 281 | <tr> | ||
352 | 282 | <td><para style="P4Bold"></para></td> | ||
353 | 283 | <td><para style="P4Bold">[[ aml.get('account', '') ]]</para></td> | ||
354 | 284 | <td><para style="P4Bold">[[ company.currency_id.name ]]</para></td> | ||
355 | 285 | <td><para style="P4Bold">[[ formatLang(aml.get('deb') or 0.0) ]]</para></td> | ||
356 | 286 | <td><para style="P4Bold">[[ formatLang(aml.get('cred') or 0.0) ]]</para></td> | ||
357 | 287 | <td><para style="P4Bold">[[ formatLang(aml.get('total') or 0.0) ]]</para></td> | ||
358 | 288 | <td><para style="P4Bold">[[ formatLang(aml.get('total') or 0.0) ]]</para></td> | ||
359 | 289 | </tr> | ||
360 | 290 | <tr> | ||
361 | 291 | [[ repeatIn(get_lines_per_currency(p_obj.employee_id.id, data, aml.get('account')), 'detail_line') ]] | ||
362 | 292 | <td><para style="P4"></para></td> | ||
363 | 293 | <td><para style="P4">Subtotal</para></td> | ||
364 | 294 | <td><para style="P4">[[ detail_line.get('currency_booking', '') ]]</para></td> | ||
365 | 295 | <td><para style="P4">[[ formatLang(detail_line.get('debit_booking') or 0.0) ]]</para></td> | ||
366 | 296 | <td><para style="P4">[[ formatLang(detail_line.get('credit_booking') or 0.0) ]]</para></td> | ||
367 | 297 | <td><para style="P4">[[ formatLang(detail_line.get('total_booking') or 0.0) ]]</para></td> | ||
368 | 298 | <td><para style="P4">[[ formatLang(detail_line.get('total_functional') or 0.0) ]]</para></td> | ||
369 | 299 | </tr> | ||
370 | 300 | </blockTable> | ||
371 | 301 | </td> | ||
372 | 302 | </tr> | ||
373 | 303 | </blockTable> | ||
374 | 304 | </td> | ||
375 | 305 | </tr> | ||
376 | 306 | </blockTable> | ||
377 | 307 | </section> | ||
378 | 308 | <!-- if there is NO DATA to be displayed: display the header only --> | ||
379 | 309 | <blockTable colWidths="50.0,37.0,81.0,50.0,91.0,118.0,90.0,43.0" style="Table2_header"> | ||
380 | 310 | [[ get_has_data() and removeParentNode('blockTable') ]] | ||
381 | 311 | <tr> | ||
382 | 312 | <td><para style="terp_tblheader_General_Centre">Chart of Account</para></td> | ||
383 | 313 | <td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td> | ||
384 | 314 | <td><para style="terp_tblheader_General_Centre">Journals</para></td> | ||
385 | 315 | <td><para style="terp_tblheader_General_Centre">Accounts</para></td> | ||
386 | 316 | <td><para style="terp_tblheader_General_Centre">Proprietary Instances</para></td> | ||
387 | 317 | <td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!=translate('No Filter') and get_filter(data) ]]</para></td> | ||
388 | 318 | <td><para style="terp_tblheader_General_Centre">Display</para></td> | ||
389 | 319 | <td><para style="terp_tblheader_General_Centre">Func. Currency</para></td> | ||
390 | 320 | </tr> | ||
391 | 321 | <tr> | ||
392 | 322 | <td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td> | ||
393 | 323 | <td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td> | ||
394 | 324 | <td> <para style="terp_default_Centre_8">[[ get_journals_str(data) ]] </para></td> | ||
395 | 325 | <td><para style="terp_default_Centre_8">[[ get_accounts_str(data) ]]</para></td> | ||
396 | 326 | <td><para style="terp_default_Centre_8">[[ get_prop_instances_str(data, pdf=True) ]]</para></td> | ||
397 | 327 | |||
398 | 328 | <td><para style="terp_default_Centre_8">[[ get_filter(data)==translate('No Filter') and get_filter(data) or removeParentNode('para') ]] </para> | ||
399 | 329 | <blockTable colWidths="55.0,55.0" style="Table3">[[ get_filter(data)==translate('Date') or removeParentNode('blockTable') ]] | ||
400 | 330 | <tr> | ||
401 | 331 | <td><para style="terp_tblheader_General_Centre">Start Date</para></td> | ||
402 | 332 | <td><para style="terp_tblheader_General_Centre">End Date</para></td> | ||
403 | 333 | </tr> | ||
404 | 334 | <tr> | ||
405 | 335 | <td><para style="terp_default_Centre_8">[[ formatLang(get_start_date(data),date=True) ]]</para></td> | ||
406 | 336 | <td><para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</para></td> | ||
407 | 337 | </tr> | ||
408 | 338 | </blockTable> | ||
409 | 339 | <blockTable colWidths="55.0,55.0" style="Table3">[[ get_filter(data)==translate('Periods') or removeParentNode('blockTable') ]] | ||
410 | 340 | <tr> | ||
411 | 341 | <td><para style="terp_tblheader_General_Centre">Start Period</para></td> | ||
412 | 342 | <td><para style="terp_tblheader_General_Centre">End Period</para></td> | ||
413 | 343 | </tr> | ||
414 | 344 | <tr> | ||
415 | 345 | <td><para style="terp_default_Centre_8">[[ get_start_period(data) or removeParentNode('para') ]]</para></td> | ||
416 | 346 | <td><para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para></td> | ||
417 | 347 | </tr> | ||
418 | 348 | </blockTable> | ||
419 | 349 | </td> | ||
420 | 350 | <td> | ||
421 | 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> | ||
422 | 352 | </td> | ||
423 | 353 | <td> | ||
424 | 354 | <para style="terp_default_Centre_8">[[ company.currency_id.name ]]</para> | ||
425 | 355 | </td> | ||
426 | 356 | </tr> | ||
427 | 357 | </blockTable> | ||
428 | 358 | |||
429 | 359 | </story> | ||
430 | 360 | </document> | ||
431 | 0 | 361 | ||
432 | === added file 'bin/addons/account/report/account_employee_ledger.mako' | |||
433 | --- bin/addons/account/report/account_employee_ledger.mako 1970-01-01 00:00:00 +0000 | |||
434 | +++ bin/addons/account/report/account_employee_ledger.mako 2022-06-01 15:15:45 +0000 | |||
435 | @@ -0,0 +1,486 @@ | |||
436 | 1 | <?xml version="1.0"?> | ||
437 | 2 | <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" | ||
438 | 3 | xmlns:o="urn:schemas-microsoft-com:office:office" | ||
439 | 4 | xmlns:x="urn:schemas-microsoft-com:office:excel" | ||
440 | 5 | xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" | ||
441 | 6 | xmlns:html="http://www.w3.org/TR/REC-html40"> | ||
442 | 7 | <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> | ||
443 | 8 | <Title>Employee</Title> | ||
444 | 9 | </DocumentProperties> | ||
445 | 10 | <Styles> | ||
446 | 11 | <Style ss:ID="ssCell"> | ||
447 | 12 | <Alignment ss:Vertical="Top" ss:WrapText="1"/> | ||
448 | 13 | </Style> | ||
449 | 14 | <Style ss:ID="ssCellRight"> | ||
450 | 15 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
451 | 16 | </Style> | ||
452 | 17 | <Style ss:ID="ssCellRightBold"> | ||
453 | 18 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
454 | 19 | <Font ss:Bold="1" /> | ||
455 | 20 | </Style> | ||
456 | 21 | <Style ss:ID="ssH"> | ||
457 | 22 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> | ||
458 | 23 | <Font ss:Bold="1" /> | ||
459 | 24 | <Borders> | ||
460 | 25 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
461 | 26 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
462 | 27 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
463 | 28 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
464 | 29 | </Borders> | ||
465 | 30 | </Style> | ||
466 | 31 | <Style ss:ID="ssBorder"> | ||
467 | 32 | <Alignment ss:Vertical="Center" ss:WrapText="1"/> | ||
468 | 33 | <Borders> | ||
469 | 34 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
470 | 35 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
471 | 36 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
472 | 37 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
473 | 38 | </Borders> | ||
474 | 39 | </Style> | ||
475 | 40 | <Style ss:ID="ssBorderDate"> | ||
476 | 41 | <Alignment ss:Vertical="Center" ss:WrapText="1"/> | ||
477 | 42 | <Borders> | ||
478 | 43 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
479 | 44 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
480 | 45 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
481 | 46 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
482 | 47 | </Borders> | ||
483 | 48 | <NumberFormat ss:Format="Short Date" /> | ||
484 | 49 | </Style> | ||
485 | 50 | <Style ss:ID="ssNumber"> | ||
486 | 51 | <Borders> | ||
487 | 52 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
488 | 53 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
489 | 54 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
490 | 55 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
491 | 56 | </Borders> | ||
492 | 57 | <Alignment ss:Horizontal="Right" ss:Vertical="Center" ss:WrapText="1"/> | ||
493 | 58 | <NumberFormat ss:Format="#,##0.00"/> | ||
494 | 59 | </Style> | ||
495 | 60 | <Style ss:ID="ssHeader"> | ||
496 | 61 | <Alignment ss:Vertical="Top" ss:Horizontal="Center" ss:WrapText="1"/> | ||
497 | 62 | <Font ss:Bold="1" /> | ||
498 | 63 | <Borders> | ||
499 | 64 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
500 | 65 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
501 | 66 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
502 | 67 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
503 | 68 | </Borders> | ||
504 | 69 | </Style> | ||
505 | 70 | <Style ss:ID="ssHeaderNumber"> | ||
506 | 71 | <Font ss:Bold="1" /> | ||
507 | 72 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
508 | 73 | <Borders> | ||
509 | 74 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
510 | 75 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
511 | 76 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
512 | 77 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
513 | 78 | </Borders> | ||
514 | 79 | <NumberFormat ss:Format="#,##0.00"/> | ||
515 | 80 | </Style> | ||
516 | 81 | <Style ss:ID="ssHeaderRight"> | ||
517 | 82 | <Font ss:Bold="1" /> | ||
518 | 83 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
519 | 84 | <Borders> | ||
520 | 85 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
521 | 86 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
522 | 87 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
523 | 88 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
524 | 89 | </Borders> | ||
525 | 90 | </Style> | ||
526 | 91 | <Style ss:ID="ssHeaderCell"> | ||
527 | 92 | <Alignment ss:Vertical="Top" ss:Horizontal="Center" ss:WrapText="1"/> | ||
528 | 93 | <Borders> | ||
529 | 94 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
530 | 95 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
531 | 96 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
532 | 97 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
533 | 98 | </Borders> | ||
534 | 99 | </Style> | ||
535 | 100 | <Style ss:ID="ssHeaderNumberCell"> | ||
536 | 101 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
537 | 102 | <Borders> | ||
538 | 103 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
539 | 104 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
540 | 105 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
541 | 106 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
542 | 107 | </Borders> | ||
543 | 108 | <NumberFormat ss:Format="#,##0.00"/> | ||
544 | 109 | </Style> | ||
545 | 110 | <Style ss:ID="ssEmployee"> | ||
546 | 111 | <Alignment ss:Vertical="Top" ss:WrapText="1"/> | ||
547 | 112 | <Font ss:Bold="1" /> | ||
548 | 113 | <Borders> | ||
549 | 114 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
550 | 115 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
551 | 116 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
552 | 117 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
553 | 118 | </Borders> | ||
554 | 119 | </Style> | ||
555 | 120 | <Style ss:ID="ssEmployeeNumber"> | ||
556 | 121 | <Font ss:Bold="1" /> | ||
557 | 122 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
558 | 123 | <Borders> | ||
559 | 124 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
560 | 125 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
561 | 126 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
562 | 127 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
563 | 128 | </Borders> | ||
564 | 129 | <NumberFormat ss:Format="#,##0.00"/> | ||
565 | 130 | </Style> | ||
566 | 131 | <Style ss:ID="ssEmployeeRight"> | ||
567 | 132 | <Font ss:Bold="1" /> | ||
568 | 133 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
569 | 134 | <Borders> | ||
570 | 135 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
571 | 136 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
572 | 137 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
573 | 138 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
574 | 139 | </Borders> | ||
575 | 140 | </Style> | ||
576 | 141 | <Style ss:ID="ssAccountLine"> | ||
577 | 142 | <Alignment ss:Vertical="Top" ss:Horizontal="Left" ss:WrapText="1"/> | ||
578 | 143 | <Font ss:Size="8"/> | ||
579 | 144 | <Borders> | ||
580 | 145 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
581 | 146 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
582 | 147 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
583 | 148 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
584 | 149 | </Borders> | ||
585 | 150 | </Style> | ||
586 | 151 | <Style ss:ID="ssSubtotalLineLeft"> | ||
587 | 152 | <Alignment ss:Vertical="Top" ss:Horizontal="Left" ss:WrapText="1"/> | ||
588 | 153 | <Font ss:Size="10"/> | ||
589 | 154 | <Borders> | ||
590 | 155 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
591 | 156 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
592 | 157 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
593 | 158 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
594 | 159 | </Borders> | ||
595 | 160 | </Style> | ||
596 | 161 | <Style ss:ID="ssSubtotalLineRight"> | ||
597 | 162 | <Alignment ss:Vertical="Top" ss:Horizontal="Right" ss:WrapText="1"/> | ||
598 | 163 | <Font ss:Size="10"/> | ||
599 | 164 | <Borders> | ||
600 | 165 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
601 | 166 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
602 | 167 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
603 | 168 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
604 | 169 | </Borders> | ||
605 | 170 | </Style> | ||
606 | 171 | <Style ss:ID="ssAccountLineWrap"> | ||
607 | 172 | <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1"/> | ||
608 | 173 | <Borders> | ||
609 | 174 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
610 | 175 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
611 | 176 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
612 | 177 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
613 | 178 | </Borders> | ||
614 | 179 | <Font ss:Size="8"/> | ||
615 | 180 | <Interior/> | ||
616 | 181 | <NumberFormat/> | ||
617 | 182 | <Protection/> | ||
618 | 183 | </Style> | ||
619 | 184 | <Style ss:ID="ssAccountLineNumber"> | ||
620 | 185 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
621 | 186 | <Font ss:Size="8"/> | ||
622 | 187 | <Borders> | ||
623 | 188 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
624 | 189 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
625 | 190 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
626 | 191 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
627 | 192 | </Borders> | ||
628 | 193 | <NumberFormat ss:Format="#,##0.00"/> | ||
629 | 194 | </Style> | ||
630 | 195 | <Style ss:ID="ssSubtotalLineNumber"> | ||
631 | 196 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
632 | 197 | <Font ss:Size="10"/> | ||
633 | 198 | <Borders> | ||
634 | 199 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
635 | 200 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
636 | 201 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
637 | 202 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
638 | 203 | </Borders> | ||
639 | 204 | <NumberFormat ss:Format="#,##0.00"/> | ||
640 | 205 | </Style> | ||
641 | 206 | <Style ss:ID="ssAccountLineAccountCode"> | ||
642 | 207 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
643 | 208 | <Font ss:Size="8"/> | ||
644 | 209 | <Borders> | ||
645 | 210 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
646 | 211 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
647 | 212 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
648 | 213 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
649 | 214 | </Borders> | ||
650 | 215 | <Interior/> | ||
651 | 216 | <NumberFormat ss:Format="0" /> | ||
652 | 217 | <Protection/> | ||
653 | 218 | </Style> | ||
654 | 219 | </Styles> | ||
655 | 220 | <Worksheet ss:Name="${( get_employees() )|x}"> | ||
656 | 221 | <Table x:FullColumns="1" x:FullRows="1"> | ||
657 | 222 | <Column ss:AutoFitWidth="1" ss:Width="140" /> | ||
658 | 223 | <Column ss:AutoFitWidth="1" ss:Width="60" /> | ||
659 | 224 | <Column ss:AutoFitWidth="1" ss:Width="70" /> | ||
660 | 225 | <Column ss:AutoFitWidth="1" ss:Width="80" /> | ||
661 | 226 | <Column ss:AutoFitWidth="1" ss:Width="45" /> | ||
662 | 227 | <Column ss:AutoFitWidth="1" ss:Width="125" /> | ||
663 | 228 | <Column ss:AutoFitWidth="1" ss:Width="60" /> | ||
664 | 229 | <Column ss:AutoFitWidth="1" ss:Width="80" /> | ||
665 | 230 | <Column ss:AutoFitWidth="1" ss:Width="80" /> | ||
666 | 231 | <Column ss:AutoFitWidth="1" ss:Width="80" /> | ||
667 | 232 | <Column ss:AutoFitWidth="1" ss:Width="80" /> | ||
668 | 233 | <Column ss:AutoFitWidth="1" ss:Width="80" /> | ||
669 | 234 | <!-- LIST OF SELECTED FILTERS --> | ||
670 | 235 | <% | ||
671 | 236 | selected_filter = get_filter(data) or '' | ||
672 | 237 | %> | ||
673 | 238 | <Row> | ||
674 | 239 | <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Chart of Account')}</Data></Cell> | ||
675 | 240 | <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Fiscal Year')}</Data></Cell> | ||
676 | 241 | <Cell ss:StyleID="ssHeader" ss:MergeAcross="1"><Data ss:Type="String">${_('Journals')}</Data></Cell> | ||
677 | 242 | <Cell ss:StyleID="ssHeader" ss:MergeAcross="1"><Data ss:Type="String">${_('Accounts')}</Data></Cell> | ||
678 | 243 | <Cell ss:StyleID="ssHeader" ss:MergeAcross="1"><Data ss:Type="String">${_('Proprietary Instances')}</Data></Cell> | ||
679 | 244 | <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${'%s %s' % (_('Filter By'), (selected_filter != _('No Filter') and selected_filter or ''))|x}</Data></Cell> | ||
680 | 245 | <Cell ss:StyleID="ssHeader" ss:MergeAcross="1"><Data ss:Type="String">${_('Display')}</Data></Cell> | ||
681 | 246 | <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Func. Currency')}</Data></Cell> | ||
682 | 247 | </Row> | ||
683 | 248 | <% | ||
684 | 249 | if selected_filter == _('Date'): | ||
685 | 250 | filter = '%s - %s' % (formatLang(get_start_date(data), date=True), formatLang(get_end_date(data), date=True)) | ||
686 | 251 | elif selected_filter == _('Periods'): | ||
687 | 252 | filter = '%s - %s' % (get_start_period(data), get_end_period(data)) | ||
688 | 253 | else: | ||
689 | 254 | filter = selected_filter | ||
690 | 255 | %> | ||
691 | 256 | <Row> | ||
692 | 257 | <Cell ss:StyleID="ssHeaderCell"> | ||
693 | 258 | <Data ss:Type="String">${ get_account(data) or ''|x}</Data> | ||
694 | 259 | </Cell> | ||
695 | 260 | <Cell ss:StyleID="ssHeaderCell"> | ||
696 | 261 | <Data ss:Type="String">${ get_fiscalyear(data) or ''|x}</Data> | ||
697 | 262 | </Cell> | ||
698 | 263 | <Cell ss:StyleID="ssHeaderCell" ss:MergeAcross="1"> | ||
699 | 264 | <Data ss:Type="String">${ get_journals_str(data)|x}</Data> | ||
700 | 265 | </Cell> | ||
701 | 266 | <Cell ss:StyleID="ssHeaderCell" ss:MergeAcross="1"> | ||
702 | 267 | <Data ss:Type="String">${ get_accounts_str(data)|x}</Data> | ||
703 | 268 | </Cell> | ||
704 | 269 | <Cell ss:StyleID="ssHeaderCell" ss:MergeAcross="1"> | ||
705 | 270 | <Data ss:Type="String">${ get_instances_str(data)|x}</Data> | ||
706 | 271 | </Cell> | ||
707 | 272 | <Cell ss:StyleID="ssHeaderCell"> | ||
708 | 273 | <Data ss:Type="String">${ filter|x}</Data> | ||
709 | 274 | </Cell> | ||
710 | 275 | <Cell ss:StyleID="ssHeaderCell" ss:MergeAcross="1"> | ||
711 | 276 | <Data ss:Type="String">${ "%s: %s, %s: %s, %s: %s, %s: %s, %s: %s, %s: %s" % ( | ||
712 | 277 | _("Employee's"), get_employees(), | ||
713 | 278 | _('Target Moves'), get_target_move(data), | ||
714 | 279 | _('Reconciled'), get_reconcile_selection(), | ||
715 | 280 | _('Display Employees'), get_display_employees_selection(), | ||
716 | 281 | _('Employee Type'), get_employee_type(data) or '-', | ||
717 | 282 | _('Payment Method'), get_payment_methods(data) or '-', | ||
718 | 283 | )|x}</Data> | ||
719 | 284 | </Cell> | ||
720 | 285 | <Cell ss:StyleID="ssHeaderCell"> | ||
721 | 286 | <Data ss:Type="String">${ company.currency_id.name |x}</Data> | ||
722 | 287 | </Cell> | ||
723 | 288 | </Row> | ||
724 | 289 | |||
725 | 290 | <!-- TABLE HEADER --> | ||
726 | 291 | <Row></Row> | ||
727 | 292 | <Row> | ||
728 | 293 | <Cell ss:StyleID="ssHeader"> | ||
729 | 294 | <Data ss:Type="String">${_('Employee')}</Data> | ||
730 | 295 | </Cell> | ||
731 | 296 | <Cell ss:StyleID="ssHeader"> | ||
732 | 297 | <Data ss:Type="String">${_('Date')}</Data> | ||
733 | 298 | </Cell> | ||
734 | 299 | <Cell ss:StyleID="ssHeader"> | ||
735 | 300 | <Data ss:Type="String">${_('JRNL')}</Data> | ||
736 | 301 | </Cell> | ||
737 | 302 | <Cell ss:StyleID="ssHeader"> | ||
738 | 303 | <Data ss:Type="String">${_('Entry Sequence')}</Data> | ||
739 | 304 | </Cell> | ||
740 | 305 | <Cell ss:StyleID="ssHeader"> | ||
741 | 306 | <Data ss:Type="String">${_('Account')}</Data> | ||
742 | 307 | </Cell> | ||
743 | 308 | <Cell ss:StyleID="ssHeader"> | ||
744 | 309 | <Data ss:Type="String">${_('Entry Label')}</Data> | ||
745 | 310 | </Cell> | ||
746 | 311 | <Cell ss:StyleID="ssHeader"> | ||
747 | 312 | <Data ss:Type="String">${_('Reconcile Number')}</Data> | ||
748 | 313 | </Cell> | ||
749 | 314 | <Cell ss:StyleID="ssHeader"> | ||
750 | 315 | <Data ss:Type="String">${_('Currency')}</Data> | ||
751 | 316 | </Cell> | ||
752 | 317 | <Cell ss:StyleID="ssHeaderRight"> | ||
753 | 318 | <Data ss:Type="String">${_('Debit')}</Data> | ||
754 | 319 | </Cell> | ||
755 | 320 | <Cell ss:StyleID="ssHeaderRight"> | ||
756 | 321 | <Data ss:Type="String">${_('Credit')}</Data> | ||
757 | 322 | </Cell> | ||
758 | 323 | <Cell ss:StyleID="ssHeaderRight"> | ||
759 | 324 | <Data ss:Type="String">${_('Booking Balance')}</Data> | ||
760 | 325 | </Cell> | ||
761 | 326 | <Cell ss:StyleID="ssHeaderRight"> | ||
762 | 327 | <Data ss:Type="String">${'%s %s' % (_('Balance'), company.currency_id.name)|x}</Data> | ||
763 | 328 | </Cell> | ||
764 | 329 | </Row> | ||
765 | 330 | |||
766 | 331 | % for p in employees_to_display(objects): | ||
767 | 332 | <!-- EMPLOYEE HEADER --> | ||
768 | 333 | <Row> | ||
769 | 334 | <Cell ss:StyleID="ssEmployee"> | ||
770 | 335 | <Data ss:Type="String">${p.name_resource or ''|x}</Data> | ||
771 | 336 | </Cell> | ||
772 | 337 | <Cell ss:StyleID="ssEmployee" ss:MergeAcross="5"> | ||
773 | 338 | <Data ss:Type="String"></Data> | ||
774 | 339 | </Cell> | ||
775 | 340 | <Cell ss:StyleID="ssEmployee"> | ||
776 | 341 | <Data ss:Type="String">${company.currency_id.name|x}</Data> | ||
777 | 342 | </Cell> | ||
778 | 343 | <Cell ss:StyleID="ssEmployeeNumber"> | ||
779 | 344 | <Data ss:Type="Number">${sum_debit_employee(p) or 0.|x}</Data> | ||
780 | 345 | </Cell> | ||
781 | 346 | <Cell ss:StyleID="ssEmployeeNumber"> | ||
782 | 347 | <Data ss:Type="Number">${sum_credit_employee(p) or 0.|x}</Data> | ||
783 | 348 | </Cell> | ||
784 | 349 | <Cell ss:StyleID="ssEmployeeNumber"> | ||
785 | 350 | <Data ss:Type="Number">${(sum_debit_employee(p) or 0.) - (sum_credit_employee(p) or 0.)|x}</Data> | ||
786 | 351 | </Cell> | ||
787 | 352 | <Cell ss:StyleID="ssEmployeeNumber"> | ||
788 | 353 | <Data ss:Type="Number">${(sum_debit_employee(p) or 0.) - (sum_credit_employee(p) or 0.)|x}</Data> | ||
789 | 354 | </Cell> | ||
790 | 355 | </Row> | ||
791 | 356 | |||
792 | 357 | % for account_code in get_accounts_to_display(p): | ||
793 | 358 | <!-- TOTALS IN FUNCTIONAL --> | ||
794 | 359 | <% | ||
795 | 360 | fctal_totals = get_fctal_totals(p, account_code) | ||
796 | 361 | %> | ||
797 | 362 | <Row> | ||
798 | 363 | <Cell ss:StyleID="ssSubtotalLineRight"> | ||
799 | 364 | <Data ss:Type="String">${p.name_resource or ''|x}</Data> | ||
800 | 365 | </Cell> | ||
801 | 366 | <Cell ss:MergeAcross="5" ss:StyleID="ssSubtotalLineRight"> | ||
802 | 367 | <Data ss:Type="String">${ account_code |x}</Data> | ||
803 | 368 | </Cell> | ||
804 | 369 | <Cell ss:StyleID="ssSubtotalLineLeft"> | ||
805 | 370 | <Data ss:Type="String">${ company.currency_id.name |x}</Data> | ||
806 | 371 | </Cell> | ||
807 | 372 | <Cell ss:StyleID="ssSubtotalLineNumber"> | ||
808 | 373 | <Data ss:Type="Number">${ fctal_totals['debit_functional'] or 0.0|x}</Data> | ||
809 | 374 | </Cell> | ||
810 | 375 | <Cell ss:StyleID="ssSubtotalLineNumber"> | ||
811 | 376 | <Data ss:Type="Number">${ fctal_totals['credit_functional'] or 0.0|x}</Data> | ||
812 | 377 | </Cell> | ||
813 | 378 | <Cell ss:StyleID="ssSubtotalLineNumber"> | ||
814 | 379 | <Data ss:Type="Number">${ fctal_totals['total_functional'] or 0.0|x}</Data> | ||
815 | 380 | </Cell> | ||
816 | 381 | <Cell ss:StyleID="ssSubtotalLineNumber"> | ||
817 | 382 | <Data ss:Type="Number">${ fctal_totals['total_functional'] or 0.0|x}</Data> | ||
818 | 383 | </Cell> | ||
819 | 384 | </Row> | ||
820 | 385 | <!-- SUBTOTAL LINES IN BOOKING --> | ||
821 | 386 | <% | ||
822 | 387 | subtotals = get_subtotals(p, account_code) | ||
823 | 388 | %> | ||
824 | 389 | % for curr in subtotals: | ||
825 | 390 | <Row> | ||
826 | 391 | <Cell ss:StyleID="ssSubtotalLineRight"> | ||
827 | 392 | <Data ss:Type="String">${p.name_resource or ''|x}</Data> | ||
828 | 393 | </Cell> | ||
829 | 394 | <Cell ss:MergeAcross="5" ss:StyleID="ssSubtotalLineRight"> | ||
830 | 395 | <Data ss:Type="String">${ _('Subtotal') |x}</Data> | ||
831 | 396 | </Cell> | ||
832 | 397 | <Cell ss:StyleID="ssSubtotalLineLeft"> | ||
833 | 398 | <Data ss:Type="String">${ curr or '' |x}</Data> | ||
834 | 399 | </Cell> | ||
835 | 400 | <Cell ss:StyleID="ssSubtotalLineNumber"> | ||
836 | 401 | <Data ss:Type="Number">${ subtotals[curr]['debit'] or 0.0|x}</Data> | ||
837 | 402 | </Cell> | ||
838 | 403 | <Cell ss:StyleID="ssSubtotalLineNumber"> | ||
839 | 404 | <Data ss:Type="Number">${ subtotals[curr]['credit'] or 0.0|x}</Data> | ||
840 | 405 | </Cell> | ||
841 | 406 | <Cell ss:StyleID="ssSubtotalLineNumber"> | ||
842 | 407 | <Data ss:Type="Number">${ subtotals[curr]['amount_currency'] or 0.0|x}</Data> | ||
843 | 408 | </Cell> | ||
844 | 409 | <Cell ss:StyleID="ssSubtotalLineNumber"> | ||
845 | 410 | <Data ss:Type="Number">${ subtotals[curr]['total_functional'] or 0.0|x}</Data> | ||
846 | 411 | </Cell> | ||
847 | 412 | </Row> | ||
848 | 413 | % endfor | ||
849 | 414 | <!-- EMPLOYEE LINES --> | ||
850 | 415 | % for line in lines(p, account_code): | ||
851 | 416 | <Row> | ||
852 | 417 | <Cell ss:StyleID="ssAccountLine"> | ||
853 | 418 | <Data ss:Type="String"></Data> | ||
854 | 419 | </Cell> | ||
855 | 420 | <Cell ss:StyleID="ssAccountLine"> | ||
856 | 421 | <Data ss:Type="String">${formatLang(line['date'], date=True)|x}</Data> | ||
857 | 422 | </Cell> | ||
858 | 423 | <Cell ss:StyleID="ssAccountLine"> | ||
859 | 424 | <Data ss:Type="String">${line['code']|x}</Data> | ||
860 | 425 | </Cell> | ||
861 | 426 | <Cell ss:StyleID="ssAccountLine"> | ||
862 | 427 | <Data ss:Type="String">${line['move_name']|x}</Data> | ||
863 | 428 | </Cell> | ||
864 | 429 | <Cell ss:StyleID="ssAccountLine"> | ||
865 | 430 | <Data ss:Type="String">${line['a_code']|x}</Data> | ||
866 | 431 | </Cell> | ||
867 | 432 | <% | ||
868 | 433 | entry_label = '%s - %s' % (line['ref'] or '', line['name'] or '') | ||
869 | 434 | %> | ||
870 | 435 | <Cell ss:StyleID="ssAccountLine"> | ||
871 | 436 | <Data ss:Type="String">${ entry_label |x}</Data> | ||
872 | 437 | </Cell> | ||
873 | 438 | <Cell ss:StyleID="ssAccountLine"> | ||
874 | 439 | <Data ss:Type="String">${ line['reconcile_txt'] or '' |x}</Data> | ||
875 | 440 | </Cell> | ||
876 | 441 | <Cell ss:StyleID="ssAccountLine"> | ||
877 | 442 | <Data ss:Type="String">${ line['currency_code'] or '' |x}</Data> | ||
878 | 443 | </Cell> | ||
879 | 444 | <Cell ss:StyleID="ssAccountLineNumber"> | ||
880 | 445 | <Data ss:Type="Number">${ line['debit'] or 0.0|x}</Data> | ||
881 | 446 | </Cell> | ||
882 | 447 | <Cell ss:StyleID="ssAccountLineNumber"> | ||
883 | 448 | <Data ss:Type="Number">${ line['credit'] or 0.0|x}</Data> | ||
884 | 449 | </Cell> | ||
885 | 450 | <Cell ss:StyleID="ssAccountLineNumber"> | ||
886 | 451 | <Data ss:Type="Number">${ line['amount_currency'] or 0.0|x}</Data> | ||
887 | 452 | </Cell> | ||
888 | 453 | <Cell ss:StyleID="ssAccountLineNumber"> | ||
889 | 454 | <Data ss:Type="Number">${ line['total_functional'] or 0.0|x}</Data> | ||
890 | 455 | </Cell> | ||
891 | 456 | </Row> | ||
892 | 457 | % endfor | ||
893 | 458 | % endfor | ||
894 | 459 | % endfor | ||
895 | 460 | |||
896 | 461 | </Table> | ||
897 | 462 | <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"> | ||
898 | 463 | <FitToPage/> | ||
899 | 464 | <PageSetup> | ||
900 | 465 | <Layout x:Orientation="Landscape"/> | ||
901 | 466 | <Header x:Data="&C&"Arial,Bold"&14Employee Ledger"/> | ||
902 | 467 | <Footer x:Data="Page &P of &N"/> | ||
903 | 468 | </PageSetup> | ||
904 | 469 | <Print> | ||
905 | 470 | <ValidPrinterInfo/> | ||
906 | 471 | <PaperSizeIndex>9</PaperSizeIndex> | ||
907 | 472 | <HorizontalResolution>600</HorizontalResolution> | ||
908 | 473 | <VerticalResolution>600</VerticalResolution> | ||
909 | 474 | </Print> | ||
910 | 475 | <Selected/> | ||
911 | 476 | <Panes> | ||
912 | 477 | <Pane> | ||
913 | 478 | <Number>3</Number> | ||
914 | 479 | <ActiveRow>17</ActiveRow> | ||
915 | 480 | </Pane> | ||
916 | 481 | </Panes> | ||
917 | 482 | <ProtectObjects>False</ProtectObjects> | ||
918 | 483 | <ProtectScenarios>False</ProtectScenarios> | ||
919 | 484 | </WorksheetOptions> | ||
920 | 485 | </Worksheet> | ||
921 | 486 | </Workbook> | ||
922 | 0 | 487 | ||
923 | === added file 'bin/addons/account/report/account_employee_ledger.py' | |||
924 | --- bin/addons/account/report/account_employee_ledger.py 1970-01-01 00:00:00 +0000 | |||
925 | +++ bin/addons/account/report/account_employee_ledger.py 2022-06-01 15:15:45 +0000 | |||
926 | @@ -0,0 +1,558 @@ | |||
927 | 1 | # -*- coding: utf-8 -*- | ||
928 | 2 | ############################################################################## | ||
929 | 3 | # | ||
930 | 4 | # OpenERP, Open Source Management Solution | ||
931 | 5 | # Copyright (C) 2022 TeMPO Consulting, MSF. All Rights Reserved | ||
932 | 6 | # | ||
933 | 7 | # This program is free software: you can redistribute it and/or modify | ||
934 | 8 | # it under the terms of the GNU Affero General Public License as | ||
935 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
936 | 10 | # License, or (at your option) any later version. | ||
937 | 11 | # | ||
938 | 12 | # This program is distributed in the hope that it will be useful, | ||
939 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
940 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
941 | 15 | # GNU Affero General Public License for more details. | ||
942 | 16 | # | ||
943 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
944 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
945 | 19 | # | ||
946 | 20 | ############################################################################## | ||
947 | 21 | |||
948 | 22 | import time | ||
949 | 23 | import re | ||
950 | 24 | from report import report_sxw | ||
951 | 25 | from common_report_header import common_report_header | ||
952 | 26 | import pooler | ||
953 | 27 | from spreadsheet_xml.spreadsheet_xml_write import SpreadsheetReport | ||
954 | 28 | from tools.translate import _ | ||
955 | 29 | |||
956 | 30 | |||
957 | 31 | class employee_ledger(report_sxw.rml_parse, common_report_header): | ||
958 | 32 | |||
959 | 33 | def __init__(self, cr, uid, name, context=None): | ||
960 | 34 | super(employee_ledger, self).__init__(cr, uid, name, context=context) | ||
961 | 35 | self.fctal_totals = {} # to store the totals in functional currency | ||
962 | 36 | self.subtotals = {} # to store the subtotals per booking currency | ||
963 | 37 | self.accounts_to_display = {} | ||
964 | 38 | self.report_lines = {} | ||
965 | 39 | self.debit_balances = {} | ||
966 | 40 | self.credit_balances = {} | ||
967 | 41 | self.current_employee_number = 0 | ||
968 | 42 | self.localcontext.update({ | ||
969 | 43 | 'employees_to_display': self._employees_to_display, | ||
970 | 44 | 'time': time, | ||
971 | 45 | 'lines': self.lines, | ||
972 | 46 | 'sum_debit_employee': self._sum_debit_employee, | ||
973 | 47 | 'sum_credit_employee': self._sum_credit_employee, | ||
974 | 48 | 'get_currency': self._get_currency, | ||
975 | 49 | 'comma_me': self.comma_me, | ||
976 | 50 | 'get_start_period': self.get_start_period, | ||
977 | 51 | 'get_end_period': self.get_end_period, | ||
978 | 52 | 'get_account': self._get_account, | ||
979 | 53 | 'get_filter': self._get_filter, | ||
980 | 54 | 'get_start_date': self._get_start_date, | ||
981 | 55 | 'get_end_date': self._get_end_date, | ||
982 | 56 | 'get_fiscalyear': self._get_fiscalyear, | ||
983 | 57 | 'get_journals_str': self._get_journals_str, | ||
984 | 58 | 'get_employees':self._get_employees, | ||
985 | 59 | 'get_target_move': self._get_target_move, | ||
986 | 60 | 'get_reconcile_selection': self._get_reconcile_selection, | ||
987 | 61 | 'get_display_employees_selection': self._get_display_employees_selection, | ||
988 | 62 | 'get_instances_str': self._get_instances_str, | ||
989 | 63 | 'get_accounts_str': self._get_accounts_str, | ||
990 | 64 | 'format_entry_label': self._format_entry_label, | ||
991 | 65 | 'get_accounts_to_display': self._get_accounts_to_display, | ||
992 | 66 | 'get_fctal_totals': self._get_fctal_totals, | ||
993 | 67 | 'get_subtotals': self._get_subtotals, | ||
994 | 68 | 'nb_employees': lambda employees: len(self._employees_to_display(employees)), | ||
995 | 69 | 'update_current_employee_number': self._update_current_employee_number, | ||
996 | 70 | 'get_current_employee_number': lambda: self.current_employee_number, | ||
997 | 71 | 'get_employee_type': self._get_employee_type, | ||
998 | 72 | 'get_payment_methods': self._get_payment_methods, | ||
999 | 73 | }) | ||
1000 | 74 | |||
1001 | 75 | def _get_employee_type(self, data): | ||
1002 | 76 | """ | ||
1003 | 77 | Returns the String to display in the "Employee Type" section of the report header | ||
1004 | 78 | """ | ||
1005 | 79 | emp_type = _('All') | ||
1006 | 80 | # if specific employees are selected don't display emp type | ||
1007 | 81 | if data['form'].get('employee_ids', False): | ||
1008 | 82 | emp_type = '-' | ||
1009 | 83 | else: | ||
1010 | 84 | emp = data['form'].get('employee_type', False) | ||
1011 | 85 | if emp == 'local': | ||
1012 | 86 | emp_type = _('Local Staff') | ||
1013 | 87 | if emp == 'ex': | ||
1014 | 88 | emp_type = _('Expatriate Staff') | ||
1015 | 89 | return emp_type | ||
1016 | 90 | |||
1017 | 91 | def _get_payment_methods(self, data): | ||
1018 | 92 | """ | ||
1019 | 93 | Returns the String to display in the "Payment Method" section of the report header | ||
1020 | 94 | """ | ||
1021 | 95 | pay_method = _('All') | ||
1022 | 96 | # if specific employees are selected don't display payment method | ||
1023 | 97 | if data['form'].get('employee_ids', False): | ||
1024 | 98 | pay_method = '-' | ||
1025 | 99 | else: | ||
1026 | 100 | method = data['form'].get('payment_method') | ||
1027 | 101 | if method != 'blank': | ||
1028 | 102 | return method | ||
1029 | 103 | return pay_method | ||
1030 | 104 | |||
1031 | 105 | def set_context(self, objects, data, ids, report_type=None): | ||
1032 | 106 | obj_move = self.pool.get('account.move.line') | ||
1033 | 107 | obj_employee = self.pool.get('hr.employee') | ||
1034 | 108 | obj_fy = self.pool.get('account.fiscalyear') | ||
1035 | 109 | used_context = data['form'].get('used_context', {}) | ||
1036 | 110 | self.reconciled = data['form'].get('reconciled', False) | ||
1037 | 111 | self.result_selection = data['form'].get('result_selection', 'customer_supplier') | ||
1038 | 112 | self.target_move = data['form'].get('target_move', 'all') | ||
1039 | 113 | self.period_id = data['form'].get('period_from', False) | ||
1040 | 114 | self.date_from = data['form'].get('date_from', False) | ||
1041 | 115 | self.instance_ids = data['form'].get('instance_ids', False) | ||
1042 | 116 | self.account_ids = data['form'].get('account_ids', False) | ||
1043 | 117 | self.display_employee = data['form'].get('display_employee', '') | ||
1044 | 118 | self.fiscalyear_id = data['form'].get('fiscalyear_id', False) | ||
1045 | 119 | self.employee_type = data['form'].get('employee_type', '') | ||
1046 | 120 | self.payment_method = data['form'].get('payment_method', '') | ||
1047 | 121 | if self.fiscalyear_id: | ||
1048 | 122 | fy = obj_fy.read(self.cr, self.uid, [self.fiscalyear_id], ['date_start'], context=used_context) | ||
1049 | 123 | else: | ||
1050 | 124 | # by default all FY taken into account | ||
1051 | 125 | used_context.update({'all_fiscalyear': True}) | ||
1052 | 126 | self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=used_context) | ||
1053 | 127 | |||
1054 | 128 | #+ To have right employee balance, we have to take all next lines after a specific date. | ||
1055 | 129 | #+ To do that, we need to make requests regarding a date. So first we take date_from | ||
1056 | 130 | #+ then period_from (if no date_from) | ||
1057 | 131 | #+ finally fisalyear_id (if no period) | ||
1058 | 132 | #+ If no date, the report is wrong. | ||
1059 | 133 | pool = pooler.get_pool(self.cr.dbname) | ||
1060 | 134 | self.DATE_FROM = '' | ||
1061 | 135 | if self.fiscalyear_id or self.period_id or self.date_from: | ||
1062 | 136 | if self.date_from: | ||
1063 | 137 | self.DATE_FROM = "AND l.date >= '%s'" % self.date_from | ||
1064 | 138 | elif self.period_id: | ||
1065 | 139 | period_obj = pool.get('account.period') | ||
1066 | 140 | period = period_obj.read(self.cr, self.uid, [self.period_id], ['date_start']) | ||
1067 | 141 | self.DATE_FROM = "AND l.date >= '%s'" % period[0].get('date_start') | ||
1068 | 142 | elif self.fiscalyear_id: | ||
1069 | 143 | self.DATE_FROM = "AND l.date >= '%s'" % fy[0].get('date_start') | ||
1070 | 144 | |||
1071 | 145 | |||
1072 | 146 | # Create the part of the request concerning instances | ||
1073 | 147 | if not self.instance_ids: | ||
1074 | 148 | # select all instances by default | ||
1075 | 149 | self.instance_ids = self.pool.get('msf.instance').search(self.cr, self.uid, [], order='NO_ORDER') | ||
1076 | 150 | if len(self.instance_ids) == 1: | ||
1077 | 151 | self.INSTANCE_REQUEST = "AND l.instance_id = %s" % self.instance_ids[0] | ||
1078 | 152 | else: | ||
1079 | 153 | self.INSTANCE_REQUEST = "AND l.instance_id IN %s" % (tuple(self.instance_ids),) | ||
1080 | 154 | |||
1081 | 155 | if self.result_selection == 'supplier': | ||
1082 | 156 | self.ACCOUNT_TYPE = ['payable'] | ||
1083 | 157 | elif self.result_selection == 'customer': | ||
1084 | 158 | self.ACCOUNT_TYPE = ['receivable'] | ||
1085 | 159 | else: | ||
1086 | 160 | self.ACCOUNT_TYPE = ['payable','receivable'] | ||
1087 | 161 | |||
1088 | 162 | # get the account list (if some accounts have been specifically selected use them directly) | ||
1089 | 163 | if not self.account_ids: | ||
1090 | 164 | self.cr.execute( | ||
1091 | 165 | "SELECT a.id " | ||
1092 | 166 | "FROM account_account a " | ||
1093 | 167 | "LEFT JOIN account_account_type t " | ||
1094 | 168 | "ON (a.user_type=t.id) " | ||
1095 | 169 | 'WHERE a.type IN %s' | ||
1096 | 170 | " " + "AND a.active", (tuple(self.ACCOUNT_TYPE), )) | ||
1097 | 171 | self.account_ids = [a for (a,) in self.cr.fetchall()] | ||
1098 | 172 | if data['form'].get('employee_ids', False): | ||
1099 | 173 | new_ids = data['form']['employee_ids'] # some employees are specifically selected | ||
1100 | 174 | else: | ||
1101 | 175 | employee_to_use = [] | ||
1102 | 176 | pay_method_request = '' | ||
1103 | 177 | emp_request = '' | ||
1104 | 178 | active_selection = "IN ('t','f')" | ||
1105 | 179 | # check if we should display all employees or only active ones | ||
1106 | 180 | if data['form'].get('only_active_employees'): | ||
1107 | 181 | active_selection = "= 't'" | ||
1108 | 182 | # check if we should include only a selected type of employees | ||
1109 | 183 | emp_type = data['form'].get('employee_type', '') | ||
1110 | 184 | if emp_type != '': | ||
1111 | 185 | emp_request += "AND emp.employee_type = '%s' " % emp_type.encode("utf-8") | ||
1112 | 186 | # check if we should include only employees using a selected method of payment | ||
1113 | 187 | pay_method = data['form'].get('payment_method') | ||
1114 | 188 | if pay_method != 'blank': | ||
1115 | 189 | emp_request += "AND pay.name = '%s' " % pay_method.encode("utf-8") | ||
1116 | 190 | # do join with payment_method only when local staff is selected because exp staff don't always have payment method registered | ||
1117 | 191 | if emp_type == 'local': | ||
1118 | 192 | pay_method_request = "JOIN hr_payment_method pay ON (emp.payment_method_id = pay.id) " | ||
1119 | 193 | emp_query = """SELECT emp.id as employee_id, emp.name_resource | ||
1120 | 194 | FROM hr_employee emp | ||
1121 | 195 | INNER JOIN resource_resource res ON emp.resource_id = res.id %s | ||
1122 | 196 | WHERE res.active %s %s | ||
1123 | 197 | ORDER BY emp.name_resource;""" % (pay_method_request, active_selection, emp_request,) | ||
1124 | 198 | self.cr.execute(emp_query) | ||
1125 | 199 | res = self.cr.dictfetchall() | ||
1126 | 200 | for res_line in res: | ||
1127 | 201 | employee_to_use.append(res_line['employee_id']) | ||
1128 | 202 | new_ids = employee_to_use | ||
1129 | 203 | self.employee_ids = new_ids | ||
1130 | 204 | objects = obj_employee.browse(self.cr, self.uid, new_ids) | ||
1131 | 205 | res = super(employee_ledger, self).set_context(objects, data, new_ids, report_type) | ||
1132 | 206 | common_report_header._set_context(self, data) | ||
1133 | 207 | if data['model'] == 'ir.ui.menu': | ||
1134 | 208 | # US-324: use of user LG instead of each employee in the report | ||
1135 | 209 | lang_dict = self.pool.get('res.users').read(self.cr,self.uid,self.uid,['context_lang']) | ||
1136 | 210 | data['lang'] = lang_dict.get('context_lang') or False | ||
1137 | 211 | |||
1138 | 212 | return res | ||
1139 | 213 | |||
1140 | 214 | def comma_me(self, amount): | ||
1141 | 215 | if type(amount) is float: | ||
1142 | 216 | amount = str('%.2f'%amount) | ||
1143 | 217 | else: | ||
1144 | 218 | amount = str(amount) | ||
1145 | 219 | if (amount == '0'): | ||
1146 | 220 | return ' ' | ||
1147 | 221 | orig = amount | ||
1148 | 222 | new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount) | ||
1149 | 223 | if orig == new: | ||
1150 | 224 | return new | ||
1151 | 225 | else: | ||
1152 | 226 | return self.comma_me(new) | ||
1153 | 227 | |||
1154 | 228 | def _format_entry_label(self, label, index): | ||
1155 | 229 | """ | ||
1156 | 230 | Formats the entry label: | ||
1157 | 231 | adds a line break every (index) character | ||
1158 | 232 | """ | ||
1159 | 233 | x = 0 | ||
1160 | 234 | parts = [] | ||
1161 | 235 | while x < len(label): | ||
1162 | 236 | parts.append(label[x:x+index]) | ||
1163 | 237 | x += index | ||
1164 | 238 | return "\n".join(parts) | ||
1165 | 239 | |||
1166 | 240 | def _get_accounts_to_display(self, employee): | ||
1167 | 241 | """ | ||
1168 | 242 | Returns the list of account codes to be displayed for the employee in parameter | ||
1169 | 243 | """ | ||
1170 | 244 | if self.accounts_to_display: | ||
1171 | 245 | return self.accounts_to_display.get(employee.id, []) | ||
1172 | 246 | move_state = ['draft', 'posted'] | ||
1173 | 247 | if self.target_move == 'posted': | ||
1174 | 248 | move_state = ['posted'] | ||
1175 | 249 | if self.reconciled == 'yes': | ||
1176 | 250 | reconcile_tag = "AND l.reconcile_id IS NOT NULL" | ||
1177 | 251 | elif self.reconciled == 'no': | ||
1178 | 252 | reconcile_tag = "AND l.reconcile_id IS NULL AND acc.reconcile='t'" # reconcilable entries not reconciled | ||
1179 | 253 | else: # 'empty' | ||
1180 | 254 | reconcile_tag = " " | ||
1181 | 255 | self.cr.execute( | ||
1182 | 256 | "SELECT l.employee_id, acc.code " | ||
1183 | 257 | "FROM account_move_line l " | ||
1184 | 258 | "LEFT JOIN account_journal j ON l.journal_id = j.id " | ||
1185 | 259 | "LEFT JOIN account_account acc ON l.account_id = acc.id " | ||
1186 | 260 | "LEFT JOIN res_currency c ON l.currency_id = c.id " | ||
1187 | 261 | "LEFT JOIN account_move m ON m.id = l.move_id " | ||
1188 | 262 | "WHERE " | ||
1189 | 263 | " l.account_id IN %s AND " + self.query + " " | ||
1190 | 264 | "AND m.state IN %s " | ||
1191 | 265 | " " + reconcile_tag + " " | ||
1192 | 266 | " " + self.DATE_FROM + " " | ||
1193 | 267 | " " + self.INSTANCE_REQUEST + " " | ||
1194 | 268 | "GROUP BY l.employee_id, acc.code ORDER BY acc.code;", | ||
1195 | 269 | (tuple(self.account_ids), tuple(move_state))) | ||
1196 | 270 | for x in self.cr.fetchall(): | ||
1197 | 271 | self.accounts_to_display.setdefault(x[0], []).append(x[1]) | ||
1198 | 272 | return self.accounts_to_display.get(employee.id, []) | ||
1199 | 273 | |||
1200 | 274 | def lines(self, employee, account_code): | ||
1201 | 275 | if employee.id in self.report_lines and account_code in self.report_lines[employee.id]: | ||
1202 | 276 | return self.report_lines[employee.id][account_code] | ||
1203 | 277 | move_state = ['draft','posted'] | ||
1204 | 278 | if self.target_move == 'posted': | ||
1205 | 279 | move_state = ['posted'] | ||
1206 | 280 | |||
1207 | 281 | if self.reconciled == 'yes': | ||
1208 | 282 | RECONCILE_TAG = "AND l.reconcile_id IS NOT NULL" | ||
1209 | 283 | elif self.reconciled == 'no': | ||
1210 | 284 | RECONCILE_TAG = "AND l.reconcile_id IS NULL AND acc.reconcile='t'" # reconcilable entries not reconciled | ||
1211 | 285 | else: # 'empty' | ||
1212 | 286 | RECONCILE_TAG = " " | ||
1213 | 287 | self.cr.execute( | ||
1214 | 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, " | ||
1215 | 289 | "COALESCE(l.debit_currency, 0) as debit, COALESCE(l.credit_currency, 0) as credit, " | ||
1216 | 290 | "COALESCE(l.debit, 0) AS debit_functional, COALESCE(l.credit, 0) AS credit_functional, " | ||
1217 | 291 | "l.debit - l.credit as total_functional, l.amount_currency, l.currency_id, c.name AS currency_code, " | ||
1218 | 292 | "l.reconcile_txt " | ||
1219 | 293 | "FROM account_move_line l " \ | ||
1220 | 294 | "LEFT JOIN account_journal j " \ | ||
1221 | 295 | "ON (l.journal_id = j.id) " \ | ||
1222 | 296 | "LEFT JOIN account_account acc " \ | ||
1223 | 297 | "ON (l.account_id = acc.id) " \ | ||
1224 | 298 | "LEFT JOIN res_currency c ON (l.currency_id=c.id)" \ | ||
1225 | 299 | "LEFT JOIN account_move m ON (m.id=l.move_id)" \ | ||
1226 | 300 | "WHERE l.employee_id = %s " \ | ||
1227 | 301 | "AND l.account_id = (SELECT id FROM account_account WHERE code = %s LIMIT 1) " | ||
1228 | 302 | "AND " + self.query + " " \ | ||
1229 | 303 | "AND m.state IN %s " \ | ||
1230 | 304 | " " + RECONCILE_TAG + " "\ | ||
1231 | 305 | " " + self.DATE_FROM + " "\ | ||
1232 | 306 | " " + self.INSTANCE_REQUEST + " " | ||
1233 | 307 | "ORDER BY l.date;", | ||
1234 | 308 | (employee.id, account_code, tuple(move_state))) | ||
1235 | 309 | if employee.id not in self.report_lines: | ||
1236 | 310 | self.report_lines[employee.id] = {} | ||
1237 | 311 | self.report_lines[employee.id][account_code] = self.cr.dictfetchall() | ||
1238 | 312 | # initialize totals in functional currency | ||
1239 | 313 | if employee.id not in self.fctal_totals: | ||
1240 | 314 | self.fctal_totals[employee.id] = {} | ||
1241 | 315 | if account_code not in self.fctal_totals[employee.id]: | ||
1242 | 316 | self.fctal_totals[employee.id][account_code] = { | ||
1243 | 317 | 'debit_functional': 0.0, | ||
1244 | 318 | 'credit_functional': 0.0, | ||
1245 | 319 | 'total_functional': 0.0, | ||
1246 | 320 | } | ||
1247 | 321 | # initialize subtotals in booking currency | ||
1248 | 322 | if employee.id not in self.subtotals: | ||
1249 | 323 | self.subtotals[employee.id] = {} | ||
1250 | 324 | if account_code not in self.subtotals[employee.id]: | ||
1251 | 325 | self.subtotals[employee.id][account_code] = {} | ||
1252 | 326 | # fill in fctal_totals/subtotals | ||
1253 | 327 | for line in self.report_lines[employee.id][account_code]: | ||
1254 | 328 | self.fctal_totals[employee.id][account_code]['debit_functional'] += line['debit_functional'] or 0.0 | ||
1255 | 329 | self.fctal_totals[employee.id][account_code]['credit_functional'] += line['credit_functional'] or 0.0 | ||
1256 | 330 | self.fctal_totals[employee.id][account_code]['total_functional'] += line['total_functional'] or 0.0 | ||
1257 | 331 | if line['currency_code'] not in self.subtotals[employee.id][account_code]: | ||
1258 | 332 | self.subtotals[employee.id][account_code][line['currency_code']] = { | ||
1259 | 333 | 'debit': 0.0, | ||
1260 | 334 | 'credit': 0.0, | ||
1261 | 335 | 'amount_currency': 0.0, | ||
1262 | 336 | 'total_functional': 0.0, | ||
1263 | 337 | } | ||
1264 | 338 | self.subtotals[employee.id][account_code][line['currency_code']]['debit'] += line['debit'] or 0.0 | ||
1265 | 339 | self.subtotals[employee.id][account_code][line['currency_code']]['credit'] += line['credit'] or 0.0 | ||
1266 | 340 | self.subtotals[employee.id][account_code][line['currency_code']]['amount_currency'] += line['amount_currency'] or 0.0 | ||
1267 | 341 | self.subtotals[employee.id][account_code][line['currency_code']]['total_functional'] += line['total_functional'] or 0.0 | ||
1268 | 342 | return self.report_lines[employee.id][account_code] | ||
1269 | 343 | |||
1270 | 344 | def _get_subtotals(self, employee, account_code): | ||
1271 | 345 | """ | ||
1272 | 346 | Returns a dictionary with key = currency code, and value = dict. of the subtotals values for the | ||
1273 | 347 | employee/account_code, i.e. {'credit': xxx, 'debit': xxx, 'amount_currency': xxx, 'total_functional': xxx} | ||
1274 | 348 | """ | ||
1275 | 349 | if employee.id not in self.subtotals or account_code not in self.subtotals[employee.id]: | ||
1276 | 350 | self.lines(employee, account_code) # fills in the self.subtotals dictionary | ||
1277 | 351 | return self.subtotals[employee.id][account_code] | ||
1278 | 352 | |||
1279 | 353 | def _get_fctal_totals(self, employee, account_code): | ||
1280 | 354 | """ | ||
1281 | 355 | Returns a dictionary with the total values in functional currency for the employee/code in param: | ||
1282 | 356 | {'credit_functional': xxx, 'debit_functional': xxx, 'total_functional': xxx} | ||
1283 | 357 | """ | ||
1284 | 358 | if employee.id not in self.fctal_totals or account_code not in self.fctal_totals[employee.id]: | ||
1285 | 359 | self.lines(employee, account_code) # fills in the self.fctal_totals dictionary | ||
1286 | 360 | return self.fctal_totals[employee.id][account_code] | ||
1287 | 361 | |||
1288 | 362 | def _update_current_employee_number(self): | ||
1289 | 363 | """ | ||
1290 | 364 | Increments the current employee number and always returns True (used for the display in rml template) | ||
1291 | 365 | """ | ||
1292 | 366 | self.current_employee_number += 1 | ||
1293 | 367 | return True | ||
1294 | 368 | |||
1295 | 369 | def _sum_debit_employee(self, employee): | ||
1296 | 370 | if employee.id in self.debit_balances: | ||
1297 | 371 | # compute the result only once per employee | ||
1298 | 372 | return self.debit_balances[employee.id] | ||
1299 | 373 | move_state = ['draft','posted'] | ||
1300 | 374 | if self.target_move == 'posted': | ||
1301 | 375 | move_state = ['posted'] | ||
1302 | 376 | |||
1303 | 377 | result_tmp = 0.0 | ||
1304 | 378 | if self.reconciled == 'yes': | ||
1305 | 379 | RECONCILE_TAG = "AND l.reconcile_id IS NOT NULL" | ||
1306 | 380 | elif self.reconciled == 'no': | ||
1307 | 381 | RECONCILE_TAG = "AND l.reconcile_id IS NULL AND acc.reconcile='t'" # reconcilable entries not reconciled | ||
1308 | 382 | else: # 'empty' | ||
1309 | 383 | RECONCILE_TAG = " " | ||
1310 | 384 | |||
1311 | 385 | self.cr.execute( | ||
1312 | 386 | "SELECT sum(debit) " \ | ||
1313 | 387 | "FROM account_move_line AS l, " \ | ||
1314 | 388 | "account_move AS m, " | ||
1315 | 389 | "account_account AS acc " | ||
1316 | 390 | "WHERE l.employee_id = %s " \ | ||
1317 | 391 | "AND m.id = l.move_id " \ | ||
1318 | 392 | "AND l.account_id = acc.id " | ||
1319 | 393 | "AND m.state IN %s " | ||
1320 | 394 | "AND account_id IN %s" \ | ||
1321 | 395 | " " + RECONCILE_TAG + " " \ | ||
1322 | 396 | " " + self.DATE_FROM + " " \ | ||
1323 | 397 | " " + self.INSTANCE_REQUEST + " " | ||
1324 | 398 | "AND " + self.query + " ", | ||
1325 | 399 | (employee.id, tuple(move_state), tuple(self.account_ids),)) | ||
1326 | 400 | |||
1327 | 401 | contemp = self.cr.fetchone() | ||
1328 | 402 | if contemp != None: | ||
1329 | 403 | result_tmp = contemp[0] or 0.0 | ||
1330 | 404 | else: | ||
1331 | 405 | result_tmp = result_tmp + 0.0 | ||
1332 | 406 | self.debit_balances[employee.id] = result_tmp | ||
1333 | 407 | return result_tmp | ||
1334 | 408 | |||
1335 | 409 | def _sum_credit_employee(self, employee): | ||
1336 | 410 | if employee.id in self.credit_balances: | ||
1337 | 411 | # compute the result only once per employee | ||
1338 | 412 | return self.credit_balances[employee.id] | ||
1339 | 413 | move_state = ['draft','posted'] | ||
1340 | 414 | if self.target_move == 'posted': | ||
1341 | 415 | move_state = ['posted'] | ||
1342 | 416 | |||
1343 | 417 | result_tmp = 0.0 | ||
1344 | 418 | if self.reconciled == 'yes': | ||
1345 | 419 | RECONCILE_TAG = "AND l.reconcile_id IS NOT NULL" | ||
1346 | 420 | elif self.reconciled == 'no': | ||
1347 | 421 | RECONCILE_TAG = "AND l.reconcile_id IS NULL AND acc.reconcile='t'" # reconcilable entries not reconciled | ||
1348 | 422 | else: # 'empty' | ||
1349 | 423 | RECONCILE_TAG = " " | ||
1350 | 424 | |||
1351 | 425 | self.cr.execute( | ||
1352 | 426 | "SELECT sum(credit) " \ | ||
1353 | 427 | "FROM account_move_line AS l, " \ | ||
1354 | 428 | "account_move AS m, " | ||
1355 | 429 | "account_account AS acc " | ||
1356 | 430 | "WHERE l.employee_id=%s " \ | ||
1357 | 431 | "AND m.id = l.move_id " \ | ||
1358 | 432 | "AND l.account_id = acc.id " | ||
1359 | 433 | "AND m.state IN %s " | ||
1360 | 434 | "AND account_id IN %s" \ | ||
1361 | 435 | " " + RECONCILE_TAG + " " \ | ||
1362 | 436 | " " + self.DATE_FROM + " " \ | ||
1363 | 437 | " " + self.INSTANCE_REQUEST + " "\ | ||
1364 | 438 | "AND " + self.query + " ", | ||
1365 | 439 | (employee.id, tuple(move_state), tuple(self.account_ids),)) | ||
1366 | 440 | |||
1367 | 441 | contemp = self.cr.fetchone() | ||
1368 | 442 | if contemp != None: | ||
1369 | 443 | result_tmp = contemp[0] or 0.0 | ||
1370 | 444 | else: | ||
1371 | 445 | result_tmp = result_tmp + 0.0 | ||
1372 | 446 | self.credit_balances[employee.id] = result_tmp | ||
1373 | 447 | return result_tmp | ||
1374 | 448 | |||
1375 | 449 | def _employees_to_display(self, employees): | ||
1376 | 450 | """ | ||
1377 | 451 | Returns the employees to be displayed in the report as a list of hr.employee browse records | ||
1378 | 452 | """ | ||
1379 | 453 | to_display = employees | ||
1380 | 454 | if self.display_employee == 'non-zero_balance': | ||
1381 | 455 | for p in employees: | ||
1382 | 456 | # fill in the dictionaries self.debit_balances and self.credit_balances | ||
1383 | 457 | self._sum_debit_employee(p) | ||
1384 | 458 | self._sum_credit_employee(p) | ||
1385 | 459 | to_display = [p for p in employees if abs(self.debit_balances[p.id] - self.credit_balances[p.id]) > 10**-3] | ||
1386 | 460 | elif self.display_employee == 'with_movements': | ||
1387 | 461 | for p in employees: | ||
1388 | 462 | for account_code in self._get_accounts_to_display(p): | ||
1389 | 463 | # fill in the dictionary self.report_lines | ||
1390 | 464 | self.lines(p, account_code) | ||
1391 | 465 | to_display = [p for p in employees if p.id in self.report_lines and self.report_lines[p.id]] | ||
1392 | 466 | return to_display | ||
1393 | 467 | |||
1394 | 468 | def _get_employees(self): | ||
1395 | 469 | if self.result_selection == 'customer': | ||
1396 | 470 | return _('Receivable Accounts') | ||
1397 | 471 | elif self.result_selection == 'supplier': | ||
1398 | 472 | return _('Payable Accounts') | ||
1399 | 473 | elif self.result_selection == 'customer_supplier': | ||
1400 | 474 | return _('Receivable and Payable Accounts') | ||
1401 | 475 | return '' | ||
1402 | 476 | |||
1403 | 477 | def _get_reconcile_selection(self): | ||
1404 | 478 | """ | ||
1405 | 479 | Returns "Yes" if "Reconciled: Yes" is selected in the wizard | ||
1406 | 480 | """ | ||
1407 | 481 | selection = _('All') | ||
1408 | 482 | if self.reconciled == 'yes': | ||
1409 | 483 | selection = _('Yes') | ||
1410 | 484 | elif self.reconciled == 'no': | ||
1411 | 485 | selection = _('No') | ||
1412 | 486 | return selection | ||
1413 | 487 | |||
1414 | 488 | def _get_display_employees_selection(self): | ||
1415 | 489 | """ | ||
1416 | 490 | Returns the String to display in the "Display Employees" section of the report header | ||
1417 | 491 | """ | ||
1418 | 492 | selection = '-' | ||
1419 | 493 | if self.display_employee == 'all': | ||
1420 | 494 | selection = _('All Employees') | ||
1421 | 495 | elif self.display_employee == 'with_movements': | ||
1422 | 496 | selection = _('With movements') | ||
1423 | 497 | elif self.display_employee == 'non-zero_balance': | ||
1424 | 498 | selection = _('With balance is not equal to 0') | ||
1425 | 499 | return selection | ||
1426 | 500 | |||
1427 | 501 | def _sum_currency_amount_account(self, account, form): | ||
1428 | 502 | self._set_get_account_currency_code(account.id) | ||
1429 | 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,)) | ||
1430 | 504 | total = self.cr.fetchone() | ||
1431 | 505 | if self.account_currency: | ||
1432 | 506 | return_field = str(total[0]) + self.account_currency | ||
1433 | 507 | return return_field | ||
1434 | 508 | else: | ||
1435 | 509 | currency_total = self.tot_currency = 0.0 | ||
1436 | 510 | return currency_total | ||
1437 | 511 | |||
1438 | 512 | def _get_journal(self, data, instance_ids=False): | ||
1439 | 513 | """ | ||
1440 | 514 | If all journals have been selected: display "All Journals" instead of listing all of them | ||
1441 | 515 | """ | ||
1442 | 516 | journal_ids = data.get('form', False) and data['form'].get('journal_ids', False) | ||
1443 | 517 | if journal_ids: | ||
1444 | 518 | journal_obj = pooler.get_pool(self.cr.dbname).get('account.journal') | ||
1445 | 519 | nb_journals = journal_obj.search(self.cr, self.uid, [], order='NO_ORDER', count=True, context=data.get('context', {})) | ||
1446 | 520 | if len(journal_ids) == nb_journals: | ||
1447 | 521 | return [_('All Journals')] | ||
1448 | 522 | instance_ids = instance_ids or data.get('form', False) and data['form'].get('instance_ids', False) | ||
1449 | 523 | journal_list = super(employee_ledger, self)._get_journal(data, instance_ids) | ||
1450 | 524 | return set(journal_list) # exclude duplications | ||
1451 | 525 | |||
1452 | 526 | def _get_journals_str(self, data): | ||
1453 | 527 | """ | ||
1454 | 528 | Returns the list of journals as a String (cut if > 300 characters) | ||
1455 | 529 | """ | ||
1456 | 530 | data_tools_obj = self.pool.get('data.tools') | ||
1457 | 531 | return data_tools_obj.truncate_list(self._get_journal(data)) | ||
1458 | 532 | |||
1459 | 533 | def _get_instances_str(self, data): | ||
1460 | 534 | """ | ||
1461 | 535 | Returns the list of instances as a String (cut if > 300 characters) | ||
1462 | 536 | """ | ||
1463 | 537 | data_tools_obj = self.pool.get('data.tools') | ||
1464 | 538 | return data_tools_obj.truncate_list(self._get_instances_from_data(data)) | ||
1465 | 539 | |||
1466 | 540 | def _get_accounts_str(self, data): | ||
1467 | 541 | """ | ||
1468 | 542 | Returns the list of accounts as a String (cut if > 300 characters) | ||
1469 | 543 | """ | ||
1470 | 544 | data_tools_obj = self.pool.get('data.tools') | ||
1471 | 545 | return data_tools_obj.truncate_list(self._get_accounts(data)) | ||
1472 | 546 | |||
1473 | 547 | # PDF report with one employee per page | ||
1474 | 548 | report_sxw.report_sxw('report.account.employee_ledger', 'hr.employee', | ||
1475 | 549 | 'addons/account/report/account_employee_ledger.rml',parser=employee_ledger, | ||
1476 | 550 | header='internal landscape') | ||
1477 | 551 | # PDF report with employees displayed one after another | ||
1478 | 552 | report_sxw.report_sxw('report.account.employee_ledger_other', 'hr.employee', | ||
1479 | 553 | 'addons/account/report/account_employee_ledger_other.rml',parser=employee_ledger, | ||
1480 | 554 | header='internal landscape') | ||
1481 | 555 | # XLS report | ||
1482 | 556 | SpreadsheetReport('report.account.employee_ledger_xls', 'hr.employee', | ||
1483 | 557 | 'addons/account/report/account_employee_ledger.mako', parser=employee_ledger) | ||
1484 | 558 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
1485 | 0 | \ No newline at end of file | 559 | \ No newline at end of file |
1486 | 1 | 560 | ||
1487 | === added file 'bin/addons/account/report/account_employee_ledger.rml' | |||
1488 | --- bin/addons/account/report/account_employee_ledger.rml 1970-01-01 00:00:00 +0000 | |||
1489 | +++ bin/addons/account/report/account_employee_ledger.rml 2022-06-01 15:15:45 +0000 | |||
1490 | @@ -0,0 +1,777 @@ | |||
1491 | 1 | <?xml version="1.0"?> | ||
1492 | 2 | <document filename="Employee Ledger.pdf"> | ||
1493 | 3 | <template pageSize="(842.0,595.0)" title="Employee Ledger" author="Tempo Consulting" allowSplitting="20"> | ||
1494 | 4 | <pageTemplate id="first"> | ||
1495 | 5 | <frame id="first" x1="28.0" y1="57.0" width="772" height="481"/> | ||
1496 | 6 | </pageTemplate> | ||
1497 | 7 | </template> | ||
1498 | 8 | <stylesheet> | ||
1499 | 9 | <blockTableStyle id="Standard_Outline"> | ||
1500 | 10 | <blockAlignment value="LEFT"/> | ||
1501 | 11 | <blockValign value="TOP"/> | ||
1502 | 12 | </blockTableStyle> | ||
1503 | 13 | <blockTableStyle id="Table1"> | ||
1504 | 14 | <blockAlignment value="LEFT"/> | ||
1505 | 15 | <blockValign value="TOP"/> | ||
1506 | 16 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
1507 | 17 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
1508 | 18 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
1509 | 19 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
1510 | 20 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
1511 | 21 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
1512 | 22 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> | ||
1513 | 23 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> | ||
1514 | 24 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
1515 | 25 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> | ||
1516 | 26 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> | ||
1517 | 27 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
1518 | 28 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/> | ||
1519 | 29 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/> | ||
1520 | 30 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
1521 | 31 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="5,0" stop="5,-1"/> | ||
1522 | 32 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="5,0" stop="5,-1"/> | ||
1523 | 33 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="5,0" stop="5,0"/> | ||
1524 | 34 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
1525 | 35 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="6,0" stop="6,-1"/> | ||
1526 | 36 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="6,0" stop="6,0"/> | ||
1527 | 37 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="7,0" stop="7,0"/> | ||
1528 | 38 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="7,0" stop="7,-1"/> | ||
1529 | 39 | </blockTableStyle> | ||
1530 | 40 | <blockTableStyle id="Table4"> | ||
1531 | 41 | <blockAlignment value="LEFT"/> | ||
1532 | 42 | <blockValign value="TOP"/> | ||
1533 | 43 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
1534 | 44 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
1535 | 45 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
1536 | 46 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
1537 | 47 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
1538 | 48 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
1539 | 49 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> | ||
1540 | 50 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> | ||
1541 | 51 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
1542 | 52 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> | ||
1543 | 53 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> | ||
1544 | 54 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
1545 | 55 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/> | ||
1546 | 56 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/> | ||
1547 | 57 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
1548 | 58 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="5,0" stop="5,-1"/> | ||
1549 | 59 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="5,0" stop="5,-1"/> | ||
1550 | 60 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="5,0" stop="5,0"/> | ||
1551 | 61 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
1552 | 62 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="6,0" stop="6,-1"/> | ||
1553 | 63 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="6,0" stop="6,0"/> | ||
1554 | 64 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/> | ||
1555 | 65 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="7,0" stop="7,-1"/> | ||
1556 | 66 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="7,0" stop="7,-1"/> | ||
1557 | 67 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="7,0" stop="7,0"/> | ||
1558 | 68 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/> | ||
1559 | 69 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="8,0" stop="8,-1"/> | ||
1560 | 70 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="8,0" stop="8,0"/> | ||
1561 | 71 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="8,-1" stop="8,-1"/> | ||
1562 | 72 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="9,0" stop="9,-1"/> | ||
1563 | 73 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="9,0" stop="9,-1"/> | ||
1564 | 74 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="9,0" stop="9,0"/> | ||
1565 | 75 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="9,-1" stop="9,-1"/> | ||
1566 | 76 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="10,0" stop="10,-1"/> | ||
1567 | 77 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="10,0" stop="10,0"/> | ||
1568 | 78 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="10,-1" stop="10,-1"/> | ||
1569 | 79 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="11,0" stop="11,-1"/> | ||
1570 | 80 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="11,0" stop="11,-1"/> | ||
1571 | 81 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="11,0" stop="11,0"/> | ||
1572 | 82 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="11,-1" stop="11,-1"/> | ||
1573 | 83 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="12,0" stop="12,-1"/> | ||
1574 | 84 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="12,0" stop="12,0"/> | ||
1575 | 85 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="12,-1" stop="12,-1"/> | ||
1576 | 86 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="13,0" stop="13,-1"/> | ||
1577 | 87 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="13,0" stop="13,-1"/> | ||
1578 | 88 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="13,0" stop="13,0"/> | ||
1579 | 89 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="13,-1" stop="13,-1"/> | ||
1580 | 90 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,1" stop="0,-1"/> | ||
1581 | 91 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,1" stop="0,1"/> | ||
1582 | 92 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
1583 | 93 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,1" stop="1,-1"/> | ||
1584 | 94 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,1" stop="1,-1"/> | ||
1585 | 95 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,1" stop="1,1"/> | ||
1586 | 96 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
1587 | 97 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,2" stop="0,-1"/> | ||
1588 | 98 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,2" stop="0,2"/> | ||
1589 | 99 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
1590 | 100 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,2" stop="1,-1"/> | ||
1591 | 101 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,2" stop="1,-1"/> | ||
1592 | 102 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,2" stop="1,2"/> | ||
1593 | 103 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
1594 | 104 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,3" stop="0,-1"/> | ||
1595 | 105 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,3" stop="0,3"/> | ||
1596 | 106 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
1597 | 107 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,3" stop="1,-1"/> | ||
1598 | 108 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,3" stop="1,-1"/> | ||
1599 | 109 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,3" stop="1,3"/> | ||
1600 | 110 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
1601 | 111 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,4" stop="0,-1"/> | ||
1602 | 112 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,4" stop="0,4"/> | ||
1603 | 113 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
1604 | 114 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,4" stop="1,-1"/> | ||
1605 | 115 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,4" stop="1,-1"/> | ||
1606 | 116 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,4" stop="1,4"/> | ||
1607 | 117 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
1608 | 118 | </blockTableStyle> | ||
1609 | 119 | <blockTableStyle id="Table7"> | ||
1610 | 120 | <blockAlignment value="LEFT"/> | ||
1611 | 121 | <blockValign value="TOP"/> | ||
1612 | 122 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
1613 | 123 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
1614 | 124 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
1615 | 125 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
1616 | 126 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
1617 | 127 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
1618 | 128 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
1619 | 129 | </blockTableStyle> | ||
1620 | 130 | <blockTableStyle id="Table9"> | ||
1621 | 131 | <blockAlignment value="LEFT"/> | ||
1622 | 132 | <blockValign value="TOP"/> | ||
1623 | 133 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
1624 | 134 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
1625 | 135 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
1626 | 136 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
1627 | 137 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
1628 | 138 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
1629 | 139 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
1630 | 140 | </blockTableStyle> | ||
1631 | 141 | <blockTableStyle id="Table10"> | ||
1632 | 142 | <blockAlignment value="LEFT"/> | ||
1633 | 143 | <blockValign value="TOP"/> | ||
1634 | 144 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
1635 | 145 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
1636 | 146 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
1637 | 147 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
1638 | 148 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
1639 | 149 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
1640 | 150 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
1641 | 151 | </blockTableStyle> | ||
1642 | 152 | <blockTableStyle id="Table11"> | ||
1643 | 153 | <blockAlignment value="LEFT"/> | ||
1644 | 154 | <blockValign value="TOP"/> | ||
1645 | 155 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
1646 | 156 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
1647 | 157 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
1648 | 158 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
1649 | 159 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
1650 | 160 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
1651 | 161 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
1652 | 162 | </blockTableStyle> | ||
1653 | 163 | <blockTableStyle id="Table2"> | ||
1654 | 164 | <blockAlignment value="LEFT"/> | ||
1655 | 165 | <blockValign value="TOP"/> | ||
1656 | 166 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> | ||
1657 | 167 | <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> | ||
1658 | 168 | <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> | ||
1659 | 169 | <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> | ||
1660 | 170 | <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> | ||
1661 | 171 | <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> | ||
1662 | 172 | <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/> | ||
1663 | 173 | <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/> | ||
1664 | 174 | <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/> | ||
1665 | 175 | <lineStyle kind="LINEBELOW" colorName="#000000" start="9,-1" stop="9,-1"/> | ||
1666 | 176 | <lineStyle kind="LINEBELOW" colorName="#000000" start="10,-1" stop="10,-1"/> | ||
1667 | 177 | </blockTableStyle> | ||
1668 | 178 | <blockTableStyle id="Table3"> | ||
1669 | 179 | <blockAlignment value="LEFT"/> | ||
1670 | 180 | <blockValign value="TOP"/> | ||
1671 | 181 | <lineStyle kind="LINEBELOW" colorName="#999999" start="0,-1" stop="0,-1"/> | ||
1672 | 182 | </blockTableStyle> | ||
1673 | 183 | <blockTableStyle id="Table5"> | ||
1674 | 184 | <blockAlignment value="LEFT"/> | ||
1675 | 185 | <blockValign value="TOP"/> | ||
1676 | 186 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
1677 | 187 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
1678 | 188 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
1679 | 189 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
1680 | 190 | </blockTableStyle> | ||
1681 | 191 | <blockTableStyle id="Table6"> | ||
1682 | 192 | <blockAlignment value="LEFT"/> | ||
1683 | 193 | <blockValign value="TOP"/> | ||
1684 | 194 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
1685 | 195 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
1686 | 196 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
1687 | 197 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
1688 | 198 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
1689 | 199 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
1690 | 200 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/> | ||
1691 | 201 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/> | ||
1692 | 202 | </blockTableStyle> | ||
1693 | 203 | <blockTableStyle id="Table8"> | ||
1694 | 204 | <blockAlignment value="LEFT"/> | ||
1695 | 205 | <blockValign value="TOP"/> | ||
1696 | 206 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> | ||
1697 | 207 | <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> | ||
1698 | 208 | <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> | ||
1699 | 209 | <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> | ||
1700 | 210 | <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> | ||
1701 | 211 | <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> | ||
1702 | 212 | <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/> | ||
1703 | 213 | <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/> | ||
1704 | 214 | <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/> | ||
1705 | 215 | </blockTableStyle> | ||
1706 | 216 | <blockTableStyle id="Table12"> | ||
1707 | 217 | <blockAlignment value="LEFT"/> | ||
1708 | 218 | <blockValign value="TOP"/> | ||
1709 | 219 | <lineStyle kind="LINEBELOW" colorName="#999999" start="0,-1" stop="0,-1"/> | ||
1710 | 220 | </blockTableStyle> | ||
1711 | 221 | <blockTableStyle id="Table13"> | ||
1712 | 222 | <blockAlignment value="LEFT"/> | ||
1713 | 223 | <blockValign value="TOP"/> | ||
1714 | 224 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
1715 | 225 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
1716 | 226 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
1717 | 227 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
1718 | 228 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
1719 | 229 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
1720 | 230 | </blockTableStyle> | ||
1721 | 231 | <blockTableStyle id="Table14"> | ||
1722 | 232 | <blockAlignment value="LEFT"/> | ||
1723 | 233 | <blockValign value="TOP"/> | ||
1724 | 234 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
1725 | 235 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
1726 | 236 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
1727 | 237 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
1728 | 238 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
1729 | 239 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
1730 | 240 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/> | ||
1731 | 241 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/> | ||
1732 | 242 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="8,-1" stop="8,-1"/> | ||
1733 | 243 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="9,-1" stop="9,-1"/> | ||
1734 | 244 | </blockTableStyle> | ||
1735 | 245 | <initialize> | ||
1736 | 246 | <paraStyle name="all" alignment="justify"/> | ||
1737 | 247 | </initialize> | ||
1738 | 248 | <paraStyle name="P1" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1739 | 249 | <paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1740 | 250 | <paraStyle name="P3" fontName="Helvetica" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1741 | 251 | <paraStyle name="P4" fontName="Helvetica" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1742 | 252 | <paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1743 | 253 | <paraStyle name="P6" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1744 | 254 | <paraStyle name="P7" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1745 | 255 | <paraStyle name="P8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1746 | 256 | <paraStyle name="P9" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1747 | 257 | <paraStyle name="PRightBold" fontName="Helvetica-Bold" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1748 | 258 | <paraStyle name="PCenteredBold" fontName="Helvetica-Bold" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1749 | 259 | <paraStyle name="Standard" fontName="Helvetica"/> | ||
1750 | 260 | <paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/> | ||
1751 | 261 | <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> | ||
1752 | 262 | <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> | ||
1753 | 263 | <paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" spaceBefore="6.0" spaceAfter="6.0"/> | ||
1754 | 264 | <paraStyle name="Index" fontName="Helvetica" fontSize="9.0" leading="11"/> | ||
1755 | 265 | <paraStyle name="Footer" fontName="Helvetica"/> | ||
1756 | 266 | <paraStyle name="Table Contents" fontName="Helvetica"/> | ||
1757 | 267 | <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/> | ||
1758 | 268 | <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> | ||
1759 | 269 | <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> | ||
1760 | 270 | <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> | ||
1761 | 271 | <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
1762 | 272 | <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
1763 | 273 | <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1764 | 274 | <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1765 | 275 | <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> | ||
1766 | 276 | <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
1767 | 277 | <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> | ||
1768 | 278 | <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
1769 | 279 | <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1770 | 280 | <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1771 | 281 | <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> | ||
1772 | 282 | <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> | ||
1773 | 283 | <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1774 | 284 | <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1775 | 285 | <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1776 | 286 | <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1777 | 287 | <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1778 | 288 | <paraStyle name="terp_default_9_italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1779 | 289 | <paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1780 | 290 | <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
1781 | 291 | <paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> | ||
1782 | 292 | <images/> | ||
1783 | 293 | </stylesheet> | ||
1784 | 294 | <story> | ||
1785 | 295 | <para style="terp_default_8">[[ setLang(data['lang']) ]]</para> | ||
1786 | 296 | <section> | ||
1787 | 297 | <para style="terp_default_8">[[ repeatIn(employees_to_display(objects), 'p') ]]</para> | ||
1788 | 298 | <para style="terp_default_8"> | ||
1789 | 299 | <font color="white"> </font> | ||
1790 | 300 | </para> | ||
1791 | 301 | <!-- update the number of the current employee displayed --> | ||
1792 | 302 | <para style="terp_header_Centre">[[ update_current_employee_number() and translate('Employee Ledger') ]]</para> | ||
1793 | 303 | <para style="terp_default_8"> | ||
1794 | 304 | <font color="white"> </font> | ||
1795 | 305 | </para> | ||
1796 | 306 | <!-- NOTE: if this HEADER has to be modified: modify also the "no data" version (below) and the "employees | ||
1797 | 307 | displayed one after another" version --> | ||
1798 | 308 | <blockTable colWidths="65.0,40.0,125.0,85.0,85.0,167.0,165.0,45.0" style="Table1"> | ||
1799 | 309 | <tr> | ||
1800 | 310 | <td> | ||
1801 | 311 | <para style="terp_tblheader_General_Centre">Chart of Account</para> | ||
1802 | 312 | </td> | ||
1803 | 313 | <td> | ||
1804 | 314 | <para style="terp_tblheader_General_Centre">Fiscal Year</para> | ||
1805 | 315 | </td> | ||
1806 | 316 | <td> | ||
1807 | 317 | <para style="terp_tblheader_General_Centre">Journals</para> | ||
1808 | 318 | </td> | ||
1809 | 319 | <td> | ||
1810 | 320 | <para style="terp_tblheader_General_Centre">Accounts</para> | ||
1811 | 321 | </td> | ||
1812 | 322 | <td> | ||
1813 | 323 | <para style="terp_tblheader_General_Centre">Proprietary Instances</para> | ||
1814 | 324 | </td> | ||
1815 | 325 | <td> | ||
1816 | 326 | <para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!=translate('No Filter') and get_filter(data) ]]</para> | ||
1817 | 327 | </td> | ||
1818 | 328 | <td> | ||
1819 | 329 | <para style="terp_tblheader_General_Centre">Display</para> | ||
1820 | 330 | </td> | ||
1821 | 331 | <td> | ||
1822 | 332 | <para style="terp_tblheader_General_Centre">Func. Currency</para> | ||
1823 | 333 | </td> | ||
1824 | 334 | </tr> | ||
1825 | 335 | </blockTable> | ||
1826 | 336 | <blockTable colWidths="65.0,40.0,125.0,85.0,85.0,167.0,165.0,45.0" style="Table4"> | ||
1827 | 337 | <tr> | ||
1828 | 338 | <td> | ||
1829 | 339 | <para style="terp_default_Centre_8">[[ get_account(data) or '' ]]</para> | ||
1830 | 340 | </td> | ||
1831 | 341 | <td> | ||
1832 | 342 | <para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para> | ||
1833 | 343 | </td> | ||
1834 | 344 | <td> | ||
1835 | 345 | <para style="terp_default_Centre_8">[[ get_journals_str(data) ]]</para> | ||
1836 | 346 | </td> | ||
1837 | 347 | <td> | ||
1838 | 348 | <para style="terp_default_Centre_8">[[ get_accounts_str(data) ]]</para> | ||
1839 | 349 | </td> | ||
1840 | 350 | <td> | ||
1841 | 351 | <para style="terp_default_Centre_8">[[ get_instances_str(data) ]]</para> | ||
1842 | 352 | </td> | ||
1843 | 353 | <td> | ||
1844 | 354 | <para style="terp_default_Centre_8">[[ get_filter(data)==translate('No Filter') and get_filter(data) or removeParentNode('para') ]]</para> | ||
1845 | 355 | <blockTable colWidths="79.0,79.0" style="Table7"> | ||
1846 | 356 | <tr> | ||
1847 | 357 | <td> | ||
1848 | 358 | <para style="terp_tblheader_General_Centre">[[ get_filter(data)==translate('Date') and translate('Start Date') or removeParentNode('blockTable') ]]</para> | ||
1849 | 359 | </td> | ||
1850 | 360 | <td> | ||
1851 | 361 | <para style="terp_tblheader_General_Centre">End Date</para> | ||
1852 | 362 | </td> | ||
1853 | 363 | </tr> | ||
1854 | 364 | </blockTable> | ||
1855 | 365 | <blockTable colWidths="79.0,79.0" style="Table9"> | ||
1856 | 366 | <tr> | ||
1857 | 367 | <td> | ||
1858 | 368 | <para style="terp_default_Centre_8">[[ get_filter(data)==translate('Date') and ' ' or removeParentNode('blockTable') ]] [[ formatLang(get_start_date(data),date=True) ]]</para> | ||
1859 | 369 | </td> | ||
1860 | 370 | <td> | ||
1861 | 371 | <para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</para> | ||
1862 | 372 | </td> | ||
1863 | 373 | </tr> | ||
1864 | 374 | </blockTable> | ||
1865 | 375 | <blockTable colWidths="79.0,79.0" style="Table10"> | ||
1866 | 376 | <tr> | ||
1867 | 377 | <td> | ||
1868 | 378 | <para style="terp_tblheader_General_Centre">[[ get_filter(data)==translate('Periods') and translate('Start Period') or removeParentNode('blockTable') ]]</para> | ||
1869 | 379 | </td> | ||
1870 | 380 | <td> | ||
1871 | 381 | <para style="terp_tblheader_General_Centre">End Period</para> | ||
1872 | 382 | </td> | ||
1873 | 383 | </tr> | ||
1874 | 384 | </blockTable> | ||
1875 | 385 | <blockTable colWidths="79.0,79.0" style="Table11"> | ||
1876 | 386 | <tr> | ||
1877 | 387 | <td> | ||
1878 | 388 | <para style="terp_default_Centre_8">[[ get_filter(data)==translate('Periods') and ' ' or removeParentNode('blockTable') ]] [[ get_start_period(data) or removeParentNode('para') ]]</para> | ||
1879 | 389 | </td> | ||
1880 | 390 | <td> | ||
1881 | 391 | <para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para> | ||
1882 | 392 | </td> | ||
1883 | 393 | </tr> | ||
1884 | 394 | </blockTable> | ||
1885 | 395 | <para style="terp_default_8"> | ||
1886 | 396 | <font color="white"> </font> | ||
1887 | 397 | </para> | ||
1888 | 398 | </td> | ||
1889 | 399 | <td> | ||
1890 | 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> | ||
1891 | 401 | </td> | ||
1892 | 402 | <td> | ||
1893 | 403 | <para style="terp_default_Centre_8">[[ company.currency_id.name ]]</para> | ||
1894 | 404 | </td> | ||
1895 | 405 | </tr> | ||
1896 | 406 | </blockTable> | ||
1897 | 407 | <para style="terp_default_8"> | ||
1898 | 408 | <font color="white"> </font> | ||
1899 | 409 | </para> | ||
1900 | 410 | <para style="terp_default_8"> | ||
1901 | 411 | <font color="white"> </font> | ||
1902 | 412 | </para> | ||
1903 | 413 | <section> | ||
1904 | 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"> | ||
1905 | 415 | <tr> | ||
1906 | 416 | <td> | ||
1907 | 417 | <para style="terp_tblheader_Details">Date</para> | ||
1908 | 418 | </td> | ||
1909 | 419 | <td> | ||
1910 | 420 | <para style="terp_tblheader_Details">JRNL</para> | ||
1911 | 421 | </td> | ||
1912 | 422 | <td> | ||
1913 | 423 | <para style="terp_tblheader_Details_Centre">Entry Sequence</para> | ||
1914 | 424 | </td> | ||
1915 | 425 | <td> | ||
1916 | 426 | <para style="terp_tblheader_Details_Centre">Account</para> | ||
1917 | 427 | </td> | ||
1918 | 428 | <td> | ||
1919 | 429 | <para style="terp_tblheader_Details_Centre">Entry Label</para> | ||
1920 | 430 | </td> | ||
1921 | 431 | <td> | ||
1922 | 432 | <para style="terp_tblheader_Details">Reconcile Number</para> | ||
1923 | 433 | </td> | ||
1924 | 434 | <td> | ||
1925 | 435 | <para style="terp_tblheader_Details">Currency</para> | ||
1926 | 436 | </td> | ||
1927 | 437 | <td> | ||
1928 | 438 | <para style="terp_tblheader_Details_Centre">Debit</para> | ||
1929 | 439 | </td> | ||
1930 | 440 | <td> | ||
1931 | 441 | <para style="terp_tblheader_Details_Centre">Credit</para> | ||
1932 | 442 | </td> | ||
1933 | 443 | <td> | ||
1934 | 444 | <para style="terp_tblheader_Details_Right">Booking Balance</para> | ||
1935 | 445 | </td> | ||
1936 | 446 | <td> | ||
1937 | 447 | <para style="terp_tblheader_Details_Right">Balance [[ company.currency_id.name ]]</para> | ||
1938 | 448 | </td> | ||
1939 | 449 | </tr> | ||
1940 | 450 | </blockTable> | ||
1941 | 451 | <blockTable colWidths="370.0,40.0,80.0,80.0,90.0,102.0" style="Table8"> | ||
1942 | 452 | <tr> | ||
1943 | 453 | <td> | ||
1944 | 454 | <para style="terp_tblheader_Details"> | ||
1945 | 455 | <font color="white"> </font> | ||
1946 | 456 | </para> | ||
1947 | 457 | </td> | ||
1948 | 458 | <td> | ||
1949 | 459 | <para style="terp_tblheader_Details"> | ||
1950 | 460 | <font color="white"> </font> | ||
1951 | 461 | </para> | ||
1952 | 462 | </td> | ||
1953 | 463 | <td> | ||
1954 | 464 | <para style="terp_tblheader_Details_Centre"> | ||
1955 | 465 | <font color="white"> </font> | ||
1956 | 466 | </para> | ||
1957 | 467 | </td> | ||
1958 | 468 | <td> | ||
1959 | 469 | <para style="terp_tblheader_Details_Centre"> | ||
1960 | 470 | <font color="white"> </font> | ||
1961 | 471 | </para> | ||
1962 | 472 | </td> | ||
1963 | 473 | <td> | ||
1964 | 474 | <para style="terp_tblheader_Details"> | ||
1965 | 475 | <font color="white"> </font> | ||
1966 | 476 | </para> | ||
1967 | 477 | </td> | ||
1968 | 478 | <td> | ||
1969 | 479 | <para style="terp_tblheader_Details_Right"> | ||
1970 | 480 | <font color="white"> </font> | ||
1971 | 481 | </para> | ||
1972 | 482 | </td> | ||
1973 | 483 | </tr> | ||
1974 | 484 | </blockTable> | ||
1975 | 485 | <blockTable colWidths="420.0,30.0,70.0,70.0,80.0,92.0" style="Table12"> | ||
1976 | 486 | <tr> | ||
1977 | 487 | <td> | ||
1978 | 488 | <para style="terp_default_Bold_9">[[ p.name_resource ]]</para> | ||
1979 | 489 | </td> | ||
1980 | 490 | <td> | ||
1981 | 491 | <para style="terp_default_Bold_9">[[ company.currency_id.name ]]</para> | ||
1982 | 492 | </td> | ||
1983 | 493 | <td> | ||
1984 | 494 | <para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_employee(p) or 0.0) ]]</para> | ||
1985 | 495 | </td> | ||
1986 | 496 | <td> | ||
1987 | 497 | <para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_employee(p) or 0.0) ]]</para> | ||
1988 | 498 | </td> | ||
1989 | 499 | <td> | ||
1990 | 500 | <para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_employee(p) or 0.0) - (sum_credit_employee(p) or 0.0)) ]]</para> | ||
1991 | 501 | </td> | ||
1992 | 502 | <td> | ||
1993 | 503 | <para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_employee(p) or 0.0) - (sum_credit_employee(p) or 0.0)) ]]</para> | ||
1994 | 504 | </td> | ||
1995 | 505 | </tr> | ||
1996 | 506 | </blockTable> | ||
1997 | 507 | |||
1998 | 508 | <section> | ||
1999 | 509 | <para style="terp_default_8">[[ repeatIn(get_accounts_to_display(p), 'account_code') ]]</para> | ||
2000 | 510 | <!-- TOTALS IN FUNCTIONAL --> | ||
2001 | 511 | <section> | ||
2002 | 512 | <blockTable colWidths="296.0,124.0,30.0,70.0,70.0,80.0,92.0" style="Table14"> | ||
2003 | 513 | <tr> | ||
2004 | 514 | <td> | ||
2005 | 515 | <para style="PCenteredBold">[[ p.name_resource or '' ]]</para> | ||
2006 | 516 | </td> | ||
2007 | 517 | <td> | ||
2008 | 518 | <para style="PRightBold">[[ account_code ]]</para> | ||
2009 | 519 | </td> | ||
2010 | 520 | <td> | ||
2011 | 521 | <para style="terp_default_Bold_8">[[ company.currency_id.name ]]</para> | ||
2012 | 522 | </td> | ||
2013 | 523 | <td> | ||
2014 | 524 | <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['debit_functional'] or 0.0) ]]</para> | ||
2015 | 525 | </td> | ||
2016 | 526 | <td> | ||
2017 | 527 | <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['credit_functional'] or 0.0) ]]</para> | ||
2018 | 528 | </td> | ||
2019 | 529 | <td> | ||
2020 | 530 | <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['total_functional'] or 0.0) ]]</para> | ||
2021 | 531 | </td> | ||
2022 | 532 | <td> | ||
2023 | 533 | <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['total_functional'] or 0.0) ]]</para> | ||
2024 | 534 | </td> | ||
2025 | 535 | </tr> | ||
2026 | 536 | </blockTable> | ||
2027 | 537 | <para style="terp_default_2"> | ||
2028 | 538 | <font color="white"> </font> | ||
2029 | 539 | </para> | ||
2030 | 540 | </section> | ||
2031 | 541 | <!-- SUBTOTAL LINES IN BOOKING --> | ||
2032 | 542 | <section> | ||
2033 | 543 | <para style="terp_default_8">[[ repeatIn(get_subtotals(p, account_code), 'curr') ]]</para> | ||
2034 | 544 | <blockTable colWidths="296.0,124.0,30.0,70.0,70.0,80.0,92.0" style="Table14"> | ||
2035 | 545 | <tr> | ||
2036 | 546 | <td> | ||
2037 | 547 | <para style="PCenteredBold">[[ p.name_resource or '' ]]</para> | ||
2038 | 548 | </td> | ||
2039 | 549 | <td> | ||
2040 | 550 | <para style="PRightBold">Subtotal</para> | ||
2041 | 551 | </td> | ||
2042 | 552 | <td> | ||
2043 | 553 | <para style="terp_default_Bold_8">[[ curr or '' ]]</para> | ||
2044 | 554 | </td> | ||
2045 | 555 | <td> | ||
2046 | 556 | <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['debit'] or 0.0) ]]</para> | ||
2047 | 557 | </td> | ||
2048 | 558 | <td> | ||
2049 | 559 | <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['credit'] or 0.0) ]]</para> | ||
2050 | 560 | </td> | ||
2051 | 561 | <td> | ||
2052 | 562 | <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['amount_currency'] or 0.0) ]]</para> | ||
2053 | 563 | </td> | ||
2054 | 564 | <td> | ||
2055 | 565 | <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['total_functional'] or 0.0) ]]</para> | ||
2056 | 566 | </td> | ||
2057 | 567 | </tr> | ||
2058 | 568 | </blockTable> | ||
2059 | 569 | <para style="terp_default_2"> | ||
2060 | 570 | <font color="white"> </font> | ||
2061 | 571 | </para> | ||
2062 | 572 | </section> | ||
2063 | 573 | <!-- LINES --> | ||
2064 | 574 | <section> | ||
2065 | 575 | <para style="terp_default_8">[[ repeatIn(lines(p, account_code), 'line') ]]</para> | ||
2066 | 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"> | ||
2067 | 577 | <tr> | ||
2068 | 578 | <td> | ||
2069 | 579 | <para style="P3">[[ formatLang(line['date'], date=True) ]]</para> | ||
2070 | 580 | </td> | ||
2071 | 581 | <td> | ||
2072 | 582 | <para style="P7">[[ line['code'] ]]</para> | ||
2073 | 583 | </td> | ||
2074 | 584 | <td> | ||
2075 | 585 | <para style="P8">[[ line['move_name'] ]]</para> | ||
2076 | 586 | </td> | ||
2077 | 587 | <td> | ||
2078 | 588 | <para style="P7">[[ line['a_code'] ]]</para> | ||
2079 | 589 | </td> | ||
2080 | 590 | <td> | ||
2081 | 591 | <para style="P3">[[ format_entry_label('%s - %s' % (line['ref'] or '', line['name'] or ''), 29) ]]</para> | ||
2082 | 592 | </td> | ||
2083 | 593 | <td> | ||
2084 | 594 | <para style="P3">[[ line['reconcile_txt'] or '' ]]</para> | ||
2085 | 595 | </td> | ||
2086 | 596 | <td> | ||
2087 | 597 | <para style="P3">[[ line['currency_code'] or '' ]]</para> | ||
2088 | 598 | </td> | ||
2089 | 599 | <td> | ||
2090 | 600 | <para style="P7">[[ formatLang(line['debit'] or 0.0) ]]</para> | ||
2091 | 601 | </td> | ||
2092 | 602 | <td> | ||
2093 | 603 | <para style="P7">[[ formatLang(line['credit'] or 0.0) ]]</para> | ||
2094 | 604 | </td> | ||
2095 | 605 | <td> | ||
2096 | 606 | <para style="P7">[[ (line['currency_id'] == None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] or 0.0) ]]</para> | ||
2097 | 607 | </td> | ||
2098 | 608 | <td> | ||
2099 | 609 | <para style="P7">[[ formatLang(line['total_functional'] or 0.0) ]]</para> | ||
2100 | 610 | </td> | ||
2101 | 611 | </tr> | ||
2102 | 612 | </blockTable> | ||
2103 | 613 | <para style="terp_default_2"> | ||
2104 | 614 | <font color="white"> </font> | ||
2105 | 615 | </para> | ||
2106 | 616 | </section> | ||
2107 | 617 | </section> | ||
2108 | 618 | <para style="terp_default_2"> | ||
2109 | 619 | <font color="white"> </font> | ||
2110 | 620 | </para> | ||
2111 | 621 | </section> | ||
2112 | 622 | <pageBreak>[[ (nb_employees(objects) == 0 or get_current_employee_number() == nb_employees(objects)) and removeParentNode('pageBreak')]]</pageBreak> | ||
2113 | 623 | </section> | ||
2114 | 624 | <section> <!-- if there is NO DATA to be displayed: display the header only --> | ||
2115 | 625 | <para style="terp_default_8"> | ||
2116 | 626 | [[ nb_employees(objects) > 0 and removeParentNode('section') ]] | ||
2117 | 627 | <font color="white"> </font> | ||
2118 | 628 | </para> | ||
2119 | 629 | <para style="terp_header_Centre">Employee Ledger</para> | ||
2120 | 630 | <para style="terp_default_8"> | ||
2121 | 631 | <font color="white"> </font> | ||
2122 | 632 | </para> | ||
2123 | 633 | <blockTable colWidths="65.0,40.0,125.0,85.0,85.0,167.0,165.0,45.0" style="Table1"> | ||
2124 | 634 | <tr> | ||
2125 | 635 | <td> | ||
2126 | 636 | <para style="terp_tblheader_General_Centre">Chart of Account</para> | ||
2127 | 637 | </td> | ||
2128 | 638 | <td> | ||
2129 | 639 | <para style="terp_tblheader_General_Centre">Fiscal Year</para> | ||
2130 | 640 | </td> | ||
2131 | 641 | <td> | ||
2132 | 642 | <para style="terp_tblheader_General_Centre">Journals</para> | ||
2133 | 643 | </td> | ||
2134 | 644 | <td> | ||
2135 | 645 | <para style="terp_tblheader_General_Centre">Accounts</para> | ||
2136 | 646 | </td> | ||
2137 | 647 | <td> | ||
2138 | 648 | <para style="terp_tblheader_General_Centre">Proprietary Instances</para> | ||
2139 | 649 | </td> | ||
2140 | 650 | <td> | ||
2141 | 651 | <para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!=translate('No Filter') and get_filter(data) ]]</para> | ||
2142 | 652 | </td> | ||
2143 | 653 | <td> | ||
2144 | 654 | <para style="terp_tblheader_General_Centre">Display</para> | ||
2145 | 655 | </td> | ||
2146 | 656 | <td> | ||
2147 | 657 | <para style="terp_tblheader_General_Centre">Func. Currency</para> | ||
2148 | 658 | </td> | ||
2149 | 659 | </tr> | ||
2150 | 660 | </blockTable> | ||
2151 | 661 | <blockTable colWidths="65.0,40.0,125.0,85.0,85.0,167.0,165.0,45.0" style="Table4"> | ||
2152 | 662 | <tr> | ||
2153 | 663 | <td> | ||
2154 | 664 | <para style="terp_default_Centre_8">[[ get_account(data) or '' ]]</para> | ||
2155 | 665 | </td> | ||
2156 | 666 | <td> | ||
2157 | 667 | <para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para> | ||
2158 | 668 | </td> | ||
2159 | 669 | <td> | ||
2160 | 670 | <para style="terp_default_Centre_8">[[ get_journals_str(data) ]]</para> | ||
2161 | 671 | </td> | ||
2162 | 672 | <td> | ||
2163 | 673 | <para style="terp_default_Centre_8">[[ get_accounts_str(data) ]]</para> | ||
2164 | 674 | </td> | ||
2165 | 675 | <td> | ||
2166 | 676 | <para style="terp_default_Centre_8">[[ get_instances_str(data) ]]</para> | ||
2167 | 677 | </td> | ||
2168 | 678 | <td> | ||
2169 | 679 | <para style="terp_default_Centre_8">[[ get_filter(data)==translate('No Filter') and get_filter(data) or removeParentNode('para') ]]</para> | ||
2170 | 680 | <blockTable colWidths="79.0,79.0" style="Table7"> | ||
2171 | 681 | <tr> | ||
2172 | 682 | <td> | ||
2173 | 683 | <para style="terp_tblheader_General_Centre">[[ get_filter(data)==translate('Date') and translate('Start Date') or removeParentNode('blockTable') ]]</para> | ||
2174 | 684 | </td> | ||
2175 | 685 | <td> | ||
2176 | 686 | <para style="terp_tblheader_General_Centre">End Date</para> | ||
2177 | 687 | </td> | ||
2178 | 688 | </tr> | ||
2179 | 689 | </blockTable> | ||
2180 | 690 | <blockTable colWidths="79.0,79.0" style="Table9"> | ||
2181 | 691 | <tr> | ||
2182 | 692 | <td> | ||
2183 | 693 | <para style="terp_default_Centre_8">[[ get_filter(data)==translate('Date') and ' ' or removeParentNode('blockTable') ]] [[ formatLang(get_start_date(data),date=True) ]]</para> | ||
2184 | 694 | </td> | ||
2185 | 695 | <td> | ||
2186 | 696 | <para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</para> | ||
2187 | 697 | </td> | ||
2188 | 698 | </tr> | ||
2189 | 699 | </blockTable> | ||
2190 | 700 | <blockTable colWidths="79.0,79.0" style="Table10"> | ||
2191 | 701 | <tr> | ||
2192 | 702 | <td> | ||
2193 | 703 | <para style="terp_tblheader_General_Centre">[[ get_filter(data)==translate('Periods') and translate('Start Period') or removeParentNode('blockTable') ]]</para> | ||
2194 | 704 | </td> | ||
2195 | 705 | <td> | ||
2196 | 706 | <para style="terp_tblheader_General_Centre">End Period</para> | ||
2197 | 707 | </td> | ||
2198 | 708 | </tr> | ||
2199 | 709 | </blockTable> | ||
2200 | 710 | <blockTable colWidths="79.0,79.0" style="Table11"> | ||
2201 | 711 | <tr> | ||
2202 | 712 | <td> | ||
2203 | 713 | <para style="terp_default_Centre_8">[[ get_filter(data)==translate('Periods') and ' ' or removeParentNode('blockTable') ]] [[ get_start_period(data) or removeParentNode('para') ]]</para> | ||
2204 | 714 | </td> | ||
2205 | 715 | <td> | ||
2206 | 716 | <para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para> | ||
2207 | 717 | </td> | ||
2208 | 718 | </tr> | ||
2209 | 719 | </blockTable> | ||
2210 | 720 | <para style="terp_default_8"> | ||
2211 | 721 | <font color="white"> </font> | ||
2212 | 722 | </para> | ||
2213 | 723 | </td> | ||
2214 | 724 | <td> | ||
2215 | 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> | ||
2216 | 726 | </td> | ||
2217 | 727 | <td> | ||
2218 | 728 | <para style="terp_default_Centre_8">[[ company.currency_id.name ]]</para> | ||
2219 | 729 | </td> | ||
2220 | 730 | </tr> | ||
2221 | 731 | </blockTable> | ||
2222 | 732 | <para style="terp_default_8"> | ||
2223 | 733 | <font color="white"> </font> | ||
2224 | 734 | </para> | ||
2225 | 735 | <para style="terp_default_8"> | ||
2226 | 736 | <font color="white"> </font> | ||
2227 | 737 | </para> | ||
2228 | 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"> | ||
2229 | 739 | <tr> | ||
2230 | 740 | <td> | ||
2231 | 741 | <para style="terp_tblheader_Details">Date</para> | ||
2232 | 742 | </td> | ||
2233 | 743 | <td> | ||
2234 | 744 | <para style="terp_tblheader_Details">JRNL</para> | ||
2235 | 745 | </td> | ||
2236 | 746 | <td> | ||
2237 | 747 | <para style="terp_tblheader_Details_Centre">Entry Sequence</para> | ||
2238 | 748 | </td> | ||
2239 | 749 | <td> | ||
2240 | 750 | <para style="terp_tblheader_Details_Centre">Account</para> | ||
2241 | 751 | </td> | ||
2242 | 752 | <td> | ||
2243 | 753 | <para style="terp_tblheader_Details_Centre">Entry Label</para> | ||
2244 | 754 | </td> | ||
2245 | 755 | <td> | ||
2246 | 756 | <para style="terp_tblheader_Details">Reconcile Number</para> | ||
2247 | 757 | </td> | ||
2248 | 758 | <td> | ||
2249 | 759 | <para style="terp_tblheader_Details">Currency</para> | ||
2250 | 760 | </td> | ||
2251 | 761 | <td> | ||
2252 | 762 | <para style="terp_tblheader_Details_Centre">Debit</para> | ||
2253 | 763 | </td> | ||
2254 | 764 | <td> | ||
2255 | 765 | <para style="terp_tblheader_Details_Centre">Credit</para> | ||
2256 | 766 | </td> | ||
2257 | 767 | <td> | ||
2258 | 768 | <para style="terp_tblheader_Details_Right">Booking Balance</para> | ||
2259 | 769 | </td> | ||
2260 | 770 | <td> | ||
2261 | 771 | <para style="terp_tblheader_Details_Right">Balance [[ company.currency_id.name ]]</para> | ||
2262 | 772 | </td> | ||
2263 | 773 | </tr> | ||
2264 | 774 | </blockTable> | ||
2265 | 775 | </section> | ||
2266 | 776 | </story> | ||
2267 | 777 | </document> | ||
2268 | 0 | 778 | ||
2269 | === added file 'bin/addons/account/report/account_employee_ledger_other.rml' | |||
2270 | --- bin/addons/account/report/account_employee_ledger_other.rml 1970-01-01 00:00:00 +0000 | |||
2271 | +++ bin/addons/account/report/account_employee_ledger_other.rml 2022-06-01 15:15:45 +0000 | |||
2272 | @@ -0,0 +1,653 @@ | |||
2273 | 1 | <?xml version="1.0"?> | ||
2274 | 2 | <document filename="Employee Ledger.pdf"> | ||
2275 | 3 | <template pageSize="(842.0,595.0)" title="Employee Ledger" author="Tempo Consulting" allowSplitting="20"> | ||
2276 | 4 | <pageTemplate id="first"> | ||
2277 | 5 | <frame id="first" x1="28.0" y1="57.0" width="772" height="481"/> | ||
2278 | 6 | </pageTemplate> | ||
2279 | 7 | </template> | ||
2280 | 8 | <stylesheet> | ||
2281 | 9 | <blockTableStyle id="Standard_Outline"> | ||
2282 | 10 | <blockAlignment value="LEFT"/> | ||
2283 | 11 | <blockValign value="TOP"/> | ||
2284 | 12 | </blockTableStyle> | ||
2285 | 13 | <blockTableStyle id="Table1"> | ||
2286 | 14 | <blockAlignment value="LEFT"/> | ||
2287 | 15 | <blockValign value="TOP"/> | ||
2288 | 16 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
2289 | 17 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
2290 | 18 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2291 | 19 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
2292 | 20 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
2293 | 21 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2294 | 22 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> | ||
2295 | 23 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> | ||
2296 | 24 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
2297 | 25 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> | ||
2298 | 26 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> | ||
2299 | 27 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
2300 | 28 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/> | ||
2301 | 29 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/> | ||
2302 | 30 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
2303 | 31 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="5,0" stop="5,-1"/> | ||
2304 | 32 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="5,0" stop="5,-1"/> | ||
2305 | 33 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="5,0" stop="5,0"/> | ||
2306 | 34 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
2307 | 35 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="6,0" stop="6,-1"/> | ||
2308 | 36 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="6,0" stop="6,0"/> | ||
2309 | 37 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="7,0" stop="7,0"/> | ||
2310 | 38 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="7,0" stop="7,-1"/> | ||
2311 | 39 | </blockTableStyle> | ||
2312 | 40 | <blockTableStyle id="Table4"> | ||
2313 | 41 | <blockAlignment value="LEFT"/> | ||
2314 | 42 | <blockValign value="TOP"/> | ||
2315 | 43 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
2316 | 44 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
2317 | 45 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2318 | 46 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
2319 | 47 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
2320 | 48 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2321 | 49 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> | ||
2322 | 50 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> | ||
2323 | 51 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
2324 | 52 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> | ||
2325 | 53 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> | ||
2326 | 54 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
2327 | 55 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/> | ||
2328 | 56 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/> | ||
2329 | 57 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
2330 | 58 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="5,0" stop="5,-1"/> | ||
2331 | 59 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="5,0" stop="5,-1"/> | ||
2332 | 60 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="5,0" stop="5,0"/> | ||
2333 | 61 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
2334 | 62 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="6,0" stop="6,-1"/> | ||
2335 | 63 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="6,0" stop="6,0"/> | ||
2336 | 64 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/> | ||
2337 | 65 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="7,0" stop="7,-1"/> | ||
2338 | 66 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="7,0" stop="7,-1"/> | ||
2339 | 67 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="7,0" stop="7,0"/> | ||
2340 | 68 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/> | ||
2341 | 69 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="8,0" stop="8,-1"/> | ||
2342 | 70 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="8,0" stop="8,0"/> | ||
2343 | 71 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="8,-1" stop="8,-1"/> | ||
2344 | 72 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="9,0" stop="9,-1"/> | ||
2345 | 73 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="9,0" stop="9,-1"/> | ||
2346 | 74 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="9,0" stop="9,0"/> | ||
2347 | 75 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="9,-1" stop="9,-1"/> | ||
2348 | 76 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="10,0" stop="10,-1"/> | ||
2349 | 77 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="10,0" stop="10,0"/> | ||
2350 | 78 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="10,-1" stop="10,-1"/> | ||
2351 | 79 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="11,0" stop="11,-1"/> | ||
2352 | 80 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="11,0" stop="11,-1"/> | ||
2353 | 81 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="11,0" stop="11,0"/> | ||
2354 | 82 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="11,-1" stop="11,-1"/> | ||
2355 | 83 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="12,0" stop="12,-1"/> | ||
2356 | 84 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="12,0" stop="12,0"/> | ||
2357 | 85 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="12,-1" stop="12,-1"/> | ||
2358 | 86 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="13,0" stop="13,-1"/> | ||
2359 | 87 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="13,0" stop="13,-1"/> | ||
2360 | 88 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="13,0" stop="13,0"/> | ||
2361 | 89 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="13,-1" stop="13,-1"/> | ||
2362 | 90 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,1" stop="0,-1"/> | ||
2363 | 91 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,1" stop="0,1"/> | ||
2364 | 92 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2365 | 93 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,1" stop="1,-1"/> | ||
2366 | 94 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,1" stop="1,-1"/> | ||
2367 | 95 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,1" stop="1,1"/> | ||
2368 | 96 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2369 | 97 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,2" stop="0,-1"/> | ||
2370 | 98 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,2" stop="0,2"/> | ||
2371 | 99 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2372 | 100 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,2" stop="1,-1"/> | ||
2373 | 101 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,2" stop="1,-1"/> | ||
2374 | 102 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,2" stop="1,2"/> | ||
2375 | 103 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2376 | 104 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,3" stop="0,-1"/> | ||
2377 | 105 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,3" stop="0,3"/> | ||
2378 | 106 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2379 | 107 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,3" stop="1,-1"/> | ||
2380 | 108 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,3" stop="1,-1"/> | ||
2381 | 109 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,3" stop="1,3"/> | ||
2382 | 110 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2383 | 111 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,4" stop="0,-1"/> | ||
2384 | 112 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,4" stop="0,4"/> | ||
2385 | 113 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2386 | 114 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,4" stop="1,-1"/> | ||
2387 | 115 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,4" stop="1,-1"/> | ||
2388 | 116 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,4" stop="1,4"/> | ||
2389 | 117 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2390 | 118 | </blockTableStyle> | ||
2391 | 119 | <blockTableStyle id="Table7"> | ||
2392 | 120 | <blockAlignment value="LEFT"/> | ||
2393 | 121 | <blockValign value="TOP"/> | ||
2394 | 122 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
2395 | 123 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
2396 | 124 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2397 | 125 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
2398 | 126 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
2399 | 127 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
2400 | 128 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2401 | 129 | </blockTableStyle> | ||
2402 | 130 | <blockTableStyle id="Table9"> | ||
2403 | 131 | <blockAlignment value="LEFT"/> | ||
2404 | 132 | <blockValign value="TOP"/> | ||
2405 | 133 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
2406 | 134 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
2407 | 135 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2408 | 136 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
2409 | 137 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
2410 | 138 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
2411 | 139 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2412 | 140 | </blockTableStyle> | ||
2413 | 141 | <blockTableStyle id="Table10"> | ||
2414 | 142 | <blockAlignment value="LEFT"/> | ||
2415 | 143 | <blockValign value="TOP"/> | ||
2416 | 144 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
2417 | 145 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
2418 | 146 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2419 | 147 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
2420 | 148 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
2421 | 149 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
2422 | 150 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2423 | 151 | </blockTableStyle> | ||
2424 | 152 | <blockTableStyle id="Table11"> | ||
2425 | 153 | <blockAlignment value="LEFT"/> | ||
2426 | 154 | <blockValign value="TOP"/> | ||
2427 | 155 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
2428 | 156 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
2429 | 157 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2430 | 158 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
2431 | 159 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
2432 | 160 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
2433 | 161 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2434 | 162 | </blockTableStyle> | ||
2435 | 163 | <blockTableStyle id="Table15"> | ||
2436 | 164 | <blockAlignment value="LEFT"/> | ||
2437 | 165 | <blockValign value="TOP"/> | ||
2438 | 166 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> | ||
2439 | 167 | <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> | ||
2440 | 168 | <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> | ||
2441 | 169 | <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> | ||
2442 | 170 | <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> | ||
2443 | 171 | <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> | ||
2444 | 172 | <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/> | ||
2445 | 173 | <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/> | ||
2446 | 174 | </blockTableStyle> | ||
2447 | 175 | <blockTableStyle id="Table3"> | ||
2448 | 176 | <blockAlignment value="LEFT"/> | ||
2449 | 177 | <blockValign value="TOP"/> | ||
2450 | 178 | <lineStyle kind="LINEBELOW" colorName="#999999" start="0,-1" stop="0,-1"/> | ||
2451 | 179 | </blockTableStyle> | ||
2452 | 180 | <blockTableStyle id="Table5"> | ||
2453 | 181 | <blockAlignment value="LEFT"/> | ||
2454 | 182 | <blockValign value="TOP"/> | ||
2455 | 183 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2456 | 184 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2457 | 185 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
2458 | 186 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
2459 | 187 | </blockTableStyle> | ||
2460 | 188 | <blockTableStyle id="Table6"> | ||
2461 | 189 | <blockAlignment value="LEFT"/> | ||
2462 | 190 | <blockValign value="TOP"/> | ||
2463 | 191 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2464 | 192 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2465 | 193 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
2466 | 194 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
2467 | 195 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
2468 | 196 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
2469 | 197 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/> | ||
2470 | 198 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/> | ||
2471 | 199 | </blockTableStyle> | ||
2472 | 200 | <blockTableStyle id="Table2"> | ||
2473 | 201 | <blockAlignment value="LEFT"/> | ||
2474 | 202 | <blockValign value="TOP"/> | ||
2475 | 203 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> | ||
2476 | 204 | <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> | ||
2477 | 205 | <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> | ||
2478 | 206 | <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> | ||
2479 | 207 | <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> | ||
2480 | 208 | <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> | ||
2481 | 209 | <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/> | ||
2482 | 210 | <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/> | ||
2483 | 211 | <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/> | ||
2484 | 212 | <lineStyle kind="LINEBELOW" colorName="#000000" start="9,-1" stop="9,-1"/> | ||
2485 | 213 | <lineStyle kind="LINEBELOW" colorName="#000000" start="10,-1" stop="10,-1"/> | ||
2486 | 214 | </blockTableStyle> | ||
2487 | 215 | <blockTableStyle id="Table8"> | ||
2488 | 216 | <blockAlignment value="LEFT"/> | ||
2489 | 217 | <blockValign value="TOP"/> | ||
2490 | 218 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> | ||
2491 | 219 | <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> | ||
2492 | 220 | <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> | ||
2493 | 221 | <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> | ||
2494 | 222 | <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> | ||
2495 | 223 | <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> | ||
2496 | 224 | <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/> | ||
2497 | 225 | <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/> | ||
2498 | 226 | <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/> | ||
2499 | 227 | <lineStyle kind="LINEBELOW" colorName="#000000" start="9,-1" stop="9,-1"/> | ||
2500 | 228 | </blockTableStyle> | ||
2501 | 229 | <blockTableStyle id="Table12"> | ||
2502 | 230 | <blockAlignment value="LEFT"/> | ||
2503 | 231 | <blockValign value="TOP"/> | ||
2504 | 232 | <lineStyle kind="LINEBELOW" colorName="#999999" start="0,-1" stop="0,-1"/> | ||
2505 | 233 | </blockTableStyle> | ||
2506 | 234 | <blockTableStyle id="Table13"> | ||
2507 | 235 | <blockAlignment value="LEFT"/> | ||
2508 | 236 | <blockValign value="TOP"/> | ||
2509 | 237 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2510 | 238 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2511 | 239 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
2512 | 240 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
2513 | 241 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
2514 | 242 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
2515 | 243 | </blockTableStyle> | ||
2516 | 244 | <blockTableStyle id="Table14"> | ||
2517 | 245 | <blockAlignment value="LEFT"/> | ||
2518 | 246 | <blockValign value="TOP"/> | ||
2519 | 247 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2520 | 248 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2521 | 249 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
2522 | 250 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
2523 | 251 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
2524 | 252 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
2525 | 253 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/> | ||
2526 | 254 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/> | ||
2527 | 255 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="8,-1" stop="8,-1"/> | ||
2528 | 256 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="9,-1" stop="9,-1"/> | ||
2529 | 257 | </blockTableStyle> | ||
2530 | 258 | <initialize> | ||
2531 | 259 | <paraStyle name="all" alignment="justify"/> | ||
2532 | 260 | </initialize> | ||
2533 | 261 | <paraStyle name="P1" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2534 | 262 | <paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2535 | 263 | <paraStyle name="P3" fontName="Helvetica" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2536 | 264 | <paraStyle name="P4" fontName="Helvetica" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2537 | 265 | <paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2538 | 266 | <paraStyle name="P6" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2539 | 267 | <paraStyle name="P7" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2540 | 268 | <paraStyle name="P8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2541 | 269 | <paraStyle name="P9" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2542 | 270 | <paraStyle name="PRightBold" fontName="Helvetica-Bold" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2543 | 271 | <paraStyle name="PCenteredBold" fontName="Helvetica-Bold" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2544 | 272 | <paraStyle name="Standard" fontName="Helvetica"/> | ||
2545 | 273 | <paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/> | ||
2546 | 274 | <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> | ||
2547 | 275 | <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> | ||
2548 | 276 | <paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" spaceBefore="6.0" spaceAfter="6.0"/> | ||
2549 | 277 | <paraStyle name="Index" fontName="Helvetica" fontSize="9.0" leading="11"/> | ||
2550 | 278 | <paraStyle name="Footer" fontName="Helvetica"/> | ||
2551 | 279 | <paraStyle name="Table Contents" fontName="Helvetica"/> | ||
2552 | 280 | <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/> | ||
2553 | 281 | <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> | ||
2554 | 282 | <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> | ||
2555 | 283 | <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> | ||
2556 | 284 | <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
2557 | 285 | <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
2558 | 286 | <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2559 | 287 | <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2560 | 288 | <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> | ||
2561 | 289 | <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
2562 | 290 | <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> | ||
2563 | 291 | <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
2564 | 292 | <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2565 | 293 | <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2566 | 294 | <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> | ||
2567 | 295 | <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> | ||
2568 | 296 | <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2569 | 297 | <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2570 | 298 | <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2571 | 299 | <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2572 | 300 | <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2573 | 301 | <paraStyle name="terp_default_9_italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2574 | 302 | <paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2575 | 303 | <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2576 | 304 | <paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> | ||
2577 | 305 | <images/> | ||
2578 | 306 | </stylesheet> | ||
2579 | 307 | <story> | ||
2580 | 308 | <para style="terp_default_8"> | ||
2581 | 309 | <font color="white"> </font> | ||
2582 | 310 | </para> | ||
2583 | 311 | <para style="terp_default_8">[[ setLang(data['lang']) ]]</para> | ||
2584 | 312 | <para style="terp_header_Centre">Employee Ledger</para> | ||
2585 | 313 | <para style="terp_default_8"> | ||
2586 | 314 | <font color="white"> </font> | ||
2587 | 315 | </para> | ||
2588 | 316 | <!-- NOTE: if this HEADER has to be modified: modify also the "One employee per page" version --> | ||
2589 | 317 | <blockTable colWidths="65.0,40.0,125.0,85.0,85.0,167.0,165.0,45.0" style="Table1"> | ||
2590 | 318 | <tr> | ||
2591 | 319 | <td> | ||
2592 | 320 | <para style="terp_tblheader_General_Centre">Chart of Account</para> | ||
2593 | 321 | </td> | ||
2594 | 322 | <td> | ||
2595 | 323 | <para style="terp_tblheader_General_Centre">Fiscal Year</para> | ||
2596 | 324 | </td> | ||
2597 | 325 | <td> | ||
2598 | 326 | <para style="terp_tblheader_General_Centre">Journals</para> | ||
2599 | 327 | </td> | ||
2600 | 328 | <td> | ||
2601 | 329 | <para style="terp_tblheader_General_Centre">Accounts</para> | ||
2602 | 330 | </td> | ||
2603 | 331 | <td> | ||
2604 | 332 | <para style="terp_tblheader_General_Centre">Proprietary Instances</para> | ||
2605 | 333 | </td> | ||
2606 | 334 | <td> | ||
2607 | 335 | <para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!=translate('No Filter') and get_filter(data) ]]</para> | ||
2608 | 336 | </td> | ||
2609 | 337 | <td> | ||
2610 | 338 | <para style="terp_tblheader_General_Centre">Display</para> | ||
2611 | 339 | </td> | ||
2612 | 340 | <td> | ||
2613 | 341 | <para style="terp_tblheader_General_Centre">Func. Currency</para> | ||
2614 | 342 | </td> | ||
2615 | 343 | </tr> | ||
2616 | 344 | </blockTable> | ||
2617 | 345 | <blockTable colWidths="65.0,40.0,125.0,85.0,85.0,167.0,165.0,45.0" style="Table4"> | ||
2618 | 346 | <tr> | ||
2619 | 347 | <td> | ||
2620 | 348 | <para style="terp_default_Centre_8">[[ get_account(data) or '' ]]</para> | ||
2621 | 349 | </td> | ||
2622 | 350 | <td> | ||
2623 | 351 | <para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para> | ||
2624 | 352 | </td> | ||
2625 | 353 | <td> | ||
2626 | 354 | <para style="terp_default_Centre_8">[[ get_journals_str(data) ]]</para> | ||
2627 | 355 | </td> | ||
2628 | 356 | <td> | ||
2629 | 357 | <para style="terp_default_Centre_8">[[ get_accounts_str(data) ]]</para> | ||
2630 | 358 | </td> | ||
2631 | 359 | <td> | ||
2632 | 360 | <para style="terp_default_Centre_8">[[ get_instances_str(data) ]]</para> | ||
2633 | 361 | </td> | ||
2634 | 362 | <td> | ||
2635 | 363 | <para style="terp_default_Centre_8">[[ get_filter(data)==translate('No Filter') and get_filter(data) or removeParentNode('para') ]]</para> | ||
2636 | 364 | <blockTable colWidths="79.0,79.0" style="Table7"> | ||
2637 | 365 | <tr> | ||
2638 | 366 | <td> | ||
2639 | 367 | <para style="terp_tblheader_General_Centre">[[ get_filter(data)==translate('Date') and translate('Start Date') or removeParentNode('blockTable') ]]</para> | ||
2640 | 368 | </td> | ||
2641 | 369 | <td> | ||
2642 | 370 | <para style="terp_tblheader_General_Centre">End Date</para> | ||
2643 | 371 | </td> | ||
2644 | 372 | </tr> | ||
2645 | 373 | </blockTable> | ||
2646 | 374 | <blockTable colWidths="79.0,79.0" style="Table9"> | ||
2647 | 375 | <tr> | ||
2648 | 376 | <td> | ||
2649 | 377 | <para style="terp_default_Centre_8">[[ get_filter(data)==translate('Date') and ' ' or removeParentNode('blockTable') ]] [[ formatLang(get_start_date(data),date=True) ]]</para> | ||
2650 | 378 | </td> | ||
2651 | 379 | <td> | ||
2652 | 380 | <para style="terp_default_Centre_8">[[ formatLang(get_end_date(data),date=True) ]]</para> | ||
2653 | 381 | </td> | ||
2654 | 382 | </tr> | ||
2655 | 383 | </blockTable> | ||
2656 | 384 | <blockTable colWidths="79.0,79.0" style="Table10"> | ||
2657 | 385 | <tr> | ||
2658 | 386 | <td> | ||
2659 | 387 | <para style="terp_tblheader_General_Centre">[[ get_filter(data)==translate('Periods') and translate('Start Period') or removeParentNode('blockTable') ]]</para> | ||
2660 | 388 | </td> | ||
2661 | 389 | <td> | ||
2662 | 390 | <para style="terp_tblheader_General_Centre">End Period</para> | ||
2663 | 391 | </td> | ||
2664 | 392 | </tr> | ||
2665 | 393 | </blockTable> | ||
2666 | 394 | <blockTable colWidths="79.0,79.0" style="Table11"> | ||
2667 | 395 | <tr> | ||
2668 | 396 | <td> | ||
2669 | 397 | <para style="terp_default_Centre_8">[[ get_filter(data)==translate('Periods') and ' ' or removeParentNode('blockTable') ]] [[ get_start_period(data) or removeParentNode('para') ]]</para> | ||
2670 | 398 | </td> | ||
2671 | 399 | <td> | ||
2672 | 400 | <para style="terp_default_Centre_8">[[ get_end_period(data) or removeParentNode('para') ]]</para> | ||
2673 | 401 | </td> | ||
2674 | 402 | </tr> | ||
2675 | 403 | </blockTable> | ||
2676 | 404 | <para style="terp_default_8"> | ||
2677 | 405 | <font color="white"> </font> | ||
2678 | 406 | </para> | ||
2679 | 407 | </td> | ||
2680 | 408 | <td> | ||
2681 | 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> | ||
2682 | 410 | </td> | ||
2683 | 411 | <td> | ||
2684 | 412 | <para style="terp_default_Centre_8">[[ company.currency_id.name ]]</para> | ||
2685 | 413 | </td> | ||
2686 | 414 | </tr> | ||
2687 | 415 | </blockTable> | ||
2688 | 416 | <para style="terp_default_8"> | ||
2689 | 417 | <font color="white"> </font> | ||
2690 | 418 | </para> | ||
2691 | 419 | <para style="terp_default_8"> | ||
2692 | 420 | <font color="white"> </font> | ||
2693 | 421 | </para> | ||
2694 | 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"> | ||
2695 | 423 | <tr> | ||
2696 | 424 | <td> | ||
2697 | 425 | <para style="terp_tblheader_Details">Date</para> | ||
2698 | 426 | </td> | ||
2699 | 427 | <td> | ||
2700 | 428 | <para style="terp_tblheader_Details">JRNL</para> | ||
2701 | 429 | </td> | ||
2702 | 430 | <td> | ||
2703 | 431 | <para style="terp_tblheader_Details_Centre">Entry Sequence</para> | ||
2704 | 432 | </td> | ||
2705 | 433 | <td> | ||
2706 | 434 | <para style="terp_tblheader_Details_Centre">Account</para> | ||
2707 | 435 | </td> | ||
2708 | 436 | <td> | ||
2709 | 437 | <para style="terp_tblheader_Details_Centre">Entry Label</para> | ||
2710 | 438 | </td> | ||
2711 | 439 | <td> | ||
2712 | 440 | <para style="terp_tblheader_Details">Reconcile Number</para> | ||
2713 | 441 | </td> | ||
2714 | 442 | <td> | ||
2715 | 443 | <para style="terp_tblheader_Details">Currency</para> | ||
2716 | 444 | </td> | ||
2717 | 445 | <td> | ||
2718 | 446 | <para style="terp_tblheader_Details_Centre">Debit</para> | ||
2719 | 447 | </td> | ||
2720 | 448 | <td> | ||
2721 | 449 | <para style="terp_tblheader_Details_Centre">Credit</para> | ||
2722 | 450 | </td> | ||
2723 | 451 | <td> | ||
2724 | 452 | <para style="terp_tblheader_Details_Right">Booking Balance</para> | ||
2725 | 453 | </td> | ||
2726 | 454 | <td> | ||
2727 | 455 | <para style="terp_tblheader_Details_Right">Balance [[ company.currency_id.name ]]</para> | ||
2728 | 456 | </td> | ||
2729 | 457 | </tr> | ||
2730 | 458 | </blockTable> | ||
2731 | 459 | <section> | ||
2732 | 460 | <para style="terp_default_8">[[ repeatIn(employees_to_display(objects), 'p') ]]</para> | ||
2733 | 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"> | ||
2734 | 462 | <tr> | ||
2735 | 463 | <td> | ||
2736 | 464 | <para style="terp_tblheader_Details"> | ||
2737 | 465 | <font color="white"> </font> | ||
2738 | 466 | </para> | ||
2739 | 467 | </td> | ||
2740 | 468 | <td> | ||
2741 | 469 | <para style="terp_tblheader_Details"> | ||
2742 | 470 | <font color="white"> </font> | ||
2743 | 471 | </para> | ||
2744 | 472 | </td> | ||
2745 | 473 | <td> | ||
2746 | 474 | <para style="terp_tblheader_Details_Centre"> | ||
2747 | 475 | <font color="white"> </font> | ||
2748 | 476 | </para> | ||
2749 | 477 | </td> | ||
2750 | 478 | <td> | ||
2751 | 479 | <para style="terp_tblheader_Details_Centre"> | ||
2752 | 480 | <font color="white"> </font> | ||
2753 | 481 | </para> | ||
2754 | 482 | </td> | ||
2755 | 483 | <td> | ||
2756 | 484 | <para style="terp_tblheader_Details"> | ||
2757 | 485 | <font color="white"> </font> | ||
2758 | 486 | </para> | ||
2759 | 487 | </td> | ||
2760 | 488 | <td> | ||
2761 | 489 | <para style="terp_tblheader_Details_Right"> | ||
2762 | 490 | <font color="white"> </font> | ||
2763 | 491 | </para> | ||
2764 | 492 | </td> | ||
2765 | 493 | <td> | ||
2766 | 494 | <para style="terp_tblheader_Details_Right"> | ||
2767 | 495 | <font color="white"> </font> | ||
2768 | 496 | </para> | ||
2769 | 497 | </td> | ||
2770 | 498 | <td> | ||
2771 | 499 | <para style="terp_tblheader_Details_Right"> | ||
2772 | 500 | <font color="white"> </font> | ||
2773 | 501 | </para> | ||
2774 | 502 | </td> | ||
2775 | 503 | <td> | ||
2776 | 504 | <para style="terp_tblheader_Details_Right"> | ||
2777 | 505 | <font color="white"> </font> | ||
2778 | 506 | </para> | ||
2779 | 507 | </td> | ||
2780 | 508 | <td> | ||
2781 | 509 | <para style="terp_tblheader_Details_Right"> | ||
2782 | 510 | <font color="white"> </font> | ||
2783 | 511 | </para> | ||
2784 | 512 | </td> | ||
2785 | 513 | </tr> | ||
2786 | 514 | </blockTable> | ||
2787 | 515 | <blockTable colWidths="420.0,30.0,70.0,70.0,80.0,92.0" style="Table12"> | ||
2788 | 516 | <tr> | ||
2789 | 517 | <td> | ||
2790 | 518 | <para style="terp_default_Bold_9">[[p.name_resource ]]</para> | ||
2791 | 519 | </td> | ||
2792 | 520 | <td> | ||
2793 | 521 | <para style="terp_default_Bold_9">[[ company.currency_id.name ]]</para> | ||
2794 | 522 | </td> | ||
2795 | 523 | <td> | ||
2796 | 524 | <para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_employee(p) or 0.0) ]]</para> | ||
2797 | 525 | </td> | ||
2798 | 526 | <td> | ||
2799 | 527 | <para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_employee(p) or 0.0) ]]</para> | ||
2800 | 528 | </td> | ||
2801 | 529 | <td> | ||
2802 | 530 | <para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_employee(p) or 0.0) - (sum_credit_employee(p) or 0.0)) ]]</para> | ||
2803 | 531 | </td> | ||
2804 | 532 | <td> | ||
2805 | 533 | <para style="terp_default_Bold_9_Right">[[ formatLang((sum_debit_employee(p) or 0.0) - (sum_credit_employee(p) or 0.0)) ]]</para> | ||
2806 | 534 | </td> | ||
2807 | 535 | </tr> | ||
2808 | 536 | </blockTable> | ||
2809 | 537 | |||
2810 | 538 | <section> | ||
2811 | 539 | <para style="terp_default_8">[[ repeatIn(get_accounts_to_display(p), 'account_code') ]]</para> | ||
2812 | 540 | <!-- TOTALS IN FUNCTIONAL --> | ||
2813 | 541 | <section> | ||
2814 | 542 | <blockTable colWidths="296.0,124.0,30.0,70.0,70.0,80.0,92.0" style="Table14"> | ||
2815 | 543 | <tr> | ||
2816 | 544 | <td> | ||
2817 | 545 | <para style="PCenteredBold">[[p.name_resource or '' ]]</para> | ||
2818 | 546 | </td> | ||
2819 | 547 | <td> | ||
2820 | 548 | <para style="PRightBold">[[ account_code ]]</para> | ||
2821 | 549 | </td> | ||
2822 | 550 | <td> | ||
2823 | 551 | <para style="terp_default_Bold_8">[[ company.currency_id.name ]]</para> | ||
2824 | 552 | </td> | ||
2825 | 553 | <td> | ||
2826 | 554 | <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['debit_functional'] or 0.0) ]]</para> | ||
2827 | 555 | </td> | ||
2828 | 556 | <td> | ||
2829 | 557 | <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['credit_functional'] or 0.0) ]]</para> | ||
2830 | 558 | </td> | ||
2831 | 559 | <td> | ||
2832 | 560 | <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['total_functional'] or 0.0) ]]</para> | ||
2833 | 561 | </td> | ||
2834 | 562 | <td> | ||
2835 | 563 | <para style="PRightBold">[[ formatLang(get_fctal_totals(p, account_code)['total_functional'] or 0.0) ]]</para> | ||
2836 | 564 | </td> | ||
2837 | 565 | </tr> | ||
2838 | 566 | </blockTable> | ||
2839 | 567 | <para style="terp_default_2"> | ||
2840 | 568 | <font color="white"> </font> | ||
2841 | 569 | </para> | ||
2842 | 570 | </section> | ||
2843 | 571 | <!-- SUBTOTAL LINES IN BOOKING --> | ||
2844 | 572 | <section> | ||
2845 | 573 | <para style="terp_default_8">[[ repeatIn(get_subtotals(p, account_code), 'curr') ]]</para> | ||
2846 | 574 | <blockTable colWidths="296.0,124.0,30.0,70.0,70.0,80.0,92.0" style="Table14"> | ||
2847 | 575 | <tr> | ||
2848 | 576 | <td> | ||
2849 | 577 | <para style="PCenteredBold">[[p.name_resource or '' ]]</para> | ||
2850 | 578 | </td> | ||
2851 | 579 | <td> | ||
2852 | 580 | <para style="PRightBold">Subtotal</para> | ||
2853 | 581 | </td> | ||
2854 | 582 | <td> | ||
2855 | 583 | <para style="terp_default_Bold_8">[[ curr or '' ]]</para> | ||
2856 | 584 | </td> | ||
2857 | 585 | <td> | ||
2858 | 586 | <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['debit'] or 0.0) ]]</para> | ||
2859 | 587 | </td> | ||
2860 | 588 | <td> | ||
2861 | 589 | <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['credit'] or 0.0) ]]</para> | ||
2862 | 590 | </td> | ||
2863 | 591 | <td> | ||
2864 | 592 | <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['amount_currency'] or 0.0) ]]</para> | ||
2865 | 593 | </td> | ||
2866 | 594 | <td> | ||
2867 | 595 | <para style="PRightBold">[[ formatLang(get_subtotals(p, account_code)[curr]['total_functional'] or 0.0) ]]</para> | ||
2868 | 596 | </td> | ||
2869 | 597 | </tr> | ||
2870 | 598 | </blockTable> | ||
2871 | 599 | <para style="terp_default_2"> | ||
2872 | 600 | <font color="white"> </font> | ||
2873 | 601 | </para> | ||
2874 | 602 | </section> | ||
2875 | 603 | <!-- LINES --> | ||
2876 | 604 | <section> | ||
2877 | 605 | <para style="terp_default_8">[[ repeatIn(lines(p, account_code), 'line') ]]</para> | ||
2878 | 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"> | ||
2879 | 607 | <tr> | ||
2880 | 608 | <td> | ||
2881 | 609 | <para style="P3">[[ formatLang(line['date'], date=True) ]]</para> | ||
2882 | 610 | </td> | ||
2883 | 611 | <td> | ||
2884 | 612 | <para style="P7">[[ line['code'] ]]</para> | ||
2885 | 613 | </td> | ||
2886 | 614 | <td> | ||
2887 | 615 | <para style="P8">[[ line['move_name'] ]]</para> | ||
2888 | 616 | </td> | ||
2889 | 617 | <td> | ||
2890 | 618 | <para style="P7">[[ line['a_code'] ]]</para> | ||
2891 | 619 | </td> | ||
2892 | 620 | <td> | ||
2893 | 621 | <para style="P3">[[ format_entry_label('%s - %s' % (line['ref'] or '', line['name'] or ''), 29) ]]</para> | ||
2894 | 622 | </td> | ||
2895 | 623 | <td> | ||
2896 | 624 | <para style="P3">[[ line['reconcile_txt'] or '' ]]</para> | ||
2897 | 625 | </td> | ||
2898 | 626 | <td> | ||
2899 | 627 | <para style="P3">[[ line['currency_code'] or '' ]]</para> | ||
2900 | 628 | </td> | ||
2901 | 629 | <td> | ||
2902 | 630 | <para style="P7">[[ formatLang(line['debit'] or 0.0) ]]</para> | ||
2903 | 631 | </td> | ||
2904 | 632 | <td> | ||
2905 | 633 | <para style="P7">[[ formatLang(line['credit'] or 0.0) ]]</para> | ||
2906 | 634 | </td> | ||
2907 | 635 | <td> | ||
2908 | 636 | <para style="P7">[[ (line['currency_id'] == None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] or 0.0) ]]</para> | ||
2909 | 637 | </td> | ||
2910 | 638 | <td> | ||
2911 | 639 | <para style="P7">[[ formatLang(line['total_functional'] or 0.0) ]]</para> | ||
2912 | 640 | </td> | ||
2913 | 641 | </tr> | ||
2914 | 642 | </blockTable> | ||
2915 | 643 | <para style="terp_default_2"> | ||
2916 | 644 | <font color="white"> </font> | ||
2917 | 645 | </para> | ||
2918 | 646 | </section> | ||
2919 | 647 | </section> | ||
2920 | 648 | <para style="terp_default_2"> | ||
2921 | 649 | <font color="white"> </font> | ||
2922 | 650 | </para> | ||
2923 | 651 | </section> | ||
2924 | 652 | </story> | ||
2925 | 653 | </document> | ||
2926 | 0 | 654 | ||
2927 | === modified file 'bin/addons/account/wizard/__init__.py' | |||
2928 | --- bin/addons/account/wizard/__init__.py 2020-04-16 14:07:13 +0000 | |||
2929 | +++ bin/addons/account/wizard/__init__.py 2022-06-01 15:15:45 +0000 | |||
2930 | @@ -67,6 +67,7 @@ | |||
2931 | 67 | 67 | ||
2932 | 68 | import free_allocation_wizard | 68 | import free_allocation_wizard |
2933 | 69 | import account_invoice_import | 69 | import account_invoice_import |
2934 | 70 | import account_report_common_employee | ||
2935 | 71 | import account_report_employee_balance | ||
2936 | 72 | import account_report_employee_ledger | ||
2937 | 70 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 73 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2938 | 71 | |||
2939 | 72 | |||
2940 | 73 | 74 | ||
2941 | === added file 'bin/addons/account/wizard/account_report_common_employee.py' | |||
2942 | --- bin/addons/account/wizard/account_report_common_employee.py 1970-01-01 00:00:00 +0000 | |||
2943 | +++ bin/addons/account/wizard/account_report_common_employee.py 2022-06-01 15:15:45 +0000 | |||
2944 | @@ -0,0 +1,86 @@ | |||
2945 | 1 | # -*- coding: utf-8 -*- | ||
2946 | 2 | ############################################################################## | ||
2947 | 3 | # | ||
2948 | 4 | # OpenERP, Open Source Management Solution | ||
2949 | 5 | # Copyright (C) 2022 TeMPO Consulting,MSF | ||
2950 | 6 | # | ||
2951 | 7 | # This program is free software: you can redistribute it and/or modify | ||
2952 | 8 | # it under the terms of the GNU Affero General Public License as | ||
2953 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
2954 | 10 | # License, or (at your option) any later version. | ||
2955 | 11 | # | ||
2956 | 12 | # This program is distributed in the hope that it will be useful, | ||
2957 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2958 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2959 | 15 | # GNU Affero General Public License for more details. | ||
2960 | 16 | # | ||
2961 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
2962 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2963 | 19 | # | ||
2964 | 20 | ############################################################################## | ||
2965 | 21 | |||
2966 | 22 | from osv import osv, fields | ||
2967 | 23 | import pooler | ||
2968 | 24 | from tools.translate import _ | ||
2969 | 25 | |||
2970 | 26 | |||
2971 | 27 | class account_common_employee_report(osv.osv_memory): | ||
2972 | 28 | _name = 'account.common.employee.report' | ||
2973 | 29 | _description = 'Account Common Employee Report' | ||
2974 | 30 | _inherit = "account.common.partner.report" | ||
2975 | 31 | _columns = { | ||
2976 | 32 | 'result_selection': fields.selection([('customer', 'Receivable Accounts'), | ||
2977 | 33 | ('supplier', 'Payable Accounts'), | ||
2978 | 34 | ('customer_supplier', 'Receivable and Payable Accounts')], | ||
2979 | 35 | "Employee's", required=True), | ||
2980 | 36 | 'account_domain': fields.char('Account domain', size=250, required=False), | ||
2981 | 37 | } | ||
2982 | 38 | |||
2983 | 39 | def onchange_result_selection(self, cr, uid, ids, result_selection, context=None): | ||
2984 | 40 | """ | ||
2985 | 41 | Adapts the domain of the account according to the selections made by the user | ||
2986 | 42 | Note: directly changing the domain on the many2many field "account_ids" doesn't work in that case so we use the | ||
2987 | 43 | invisible field "account_domain" to store the domain and use it in the view... | ||
2988 | 44 | """ | ||
2989 | 45 | if context is None: | ||
2990 | 46 | context = {} | ||
2991 | 47 | res = {} | ||
2992 | 48 | if result_selection == 'supplier': | ||
2993 | 49 | account_domain = [('type', 'in', ['payable'])] | ||
2994 | 50 | elif result_selection == 'customer': | ||
2995 | 51 | account_domain = [('type', 'in', ['receivable'])] | ||
2996 | 52 | else: | ||
2997 | 53 | account_domain = [('type', 'in', ['payable', 'receivable'])] | ||
2998 | 54 | res['value'] = {'account_domain': '%s' % account_domain} | ||
2999 | 55 | return res | ||
3000 | 56 | |||
3001 | 57 | def onchange_payment_method(self, cr, uid, ids, payment_method, context=None): | ||
3002 | 58 | """ | ||
3003 | 59 | Exclude expatriate when one method of payment is chosen and only display Nat staff using this method of payment. | ||
3004 | 60 | """ | ||
3005 | 61 | if context is None: | ||
3006 | 62 | context = {} | ||
3007 | 63 | res = {} | ||
3008 | 64 | if payment_method and payment_method != 'blank': | ||
3009 | 65 | res['value'] = {'employee_type': 'local'} | ||
3010 | 66 | return res | ||
3011 | 67 | |||
3012 | 68 | def onchange_employee_type(self, cr, uid, ids, employee_type, context=None): | ||
3013 | 69 | """ | ||
3014 | 70 | When expatriate is selected set method of payment to blank | ||
3015 | 71 | """ | ||
3016 | 72 | if context is None: | ||
3017 | 73 | context = {} | ||
3018 | 74 | res = {} | ||
3019 | 75 | if not employee_type or employee_type in ('', 'ex'): | ||
3020 | 76 | res['value'] = {'payment_method': 'blank'} | ||
3021 | 77 | return res | ||
3022 | 78 | |||
3023 | 79 | _defaults = { | ||
3024 | 80 | 'result_selection': 'customer', | ||
3025 | 81 | } | ||
3026 | 82 | |||
3027 | 83 | |||
3028 | 84 | account_common_employee_report() | ||
3029 | 85 | |||
3030 | 86 | #vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
3031 | 0 | 87 | ||
3032 | === added file 'bin/addons/account/wizard/account_report_employee_balance.py' | |||
3033 | --- bin/addons/account/wizard/account_report_employee_balance.py 1970-01-01 00:00:00 +0000 | |||
3034 | +++ bin/addons/account/wizard/account_report_employee_balance.py 2022-06-01 15:15:45 +0000 | |||
3035 | @@ -0,0 +1,55 @@ | |||
3036 | 1 | # -*- coding: utf-8 -*- | ||
3037 | 2 | ############################################################################## | ||
3038 | 3 | # | ||
3039 | 4 | # OpenERP, Open Source Management Solution | ||
3040 | 5 | # Copyright (C) 2022 TeMPO Consulting, MSF | ||
3041 | 6 | # | ||
3042 | 7 | # This program is free software: you can redistribute it and/or modify | ||
3043 | 8 | # it under the terms of the GNU Affero General Public License as | ||
3044 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
3045 | 10 | # License, or (at your option) any later version. | ||
3046 | 11 | # | ||
3047 | 12 | # This program is distributed in the hope that it will be useful, | ||
3048 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3049 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3050 | 15 | # GNU Affero General Public License for more details. | ||
3051 | 16 | # | ||
3052 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
3053 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3054 | 19 | # | ||
3055 | 20 | ############################################################################## | ||
3056 | 21 | |||
3057 | 22 | from osv import fields, osv | ||
3058 | 23 | |||
3059 | 24 | |||
3060 | 25 | class account_employee_balance(osv.osv_memory): | ||
3061 | 26 | """ | ||
3062 | 27 | This wizard will provide the employee balance report by periods, between any two dates. | ||
3063 | 28 | """ | ||
3064 | 29 | _inherit = 'account.common.employee.report' | ||
3065 | 30 | _name = 'account.employee.balance' | ||
3066 | 31 | _description = 'Print Account Employee Balance' | ||
3067 | 32 | _columns = { | ||
3068 | 33 | 'display_employee': fields.selection([('non-zero_balance', 'With balance is not equal to 0'), | ||
3069 | 34 | ('all', 'All Employees')], 'Display Employees'), | ||
3070 | 35 | } | ||
3071 | 36 | |||
3072 | 37 | _defaults = { | ||
3073 | 38 | 'display_employee': 'non-zero_balance', | ||
3074 | 39 | } | ||
3075 | 40 | |||
3076 | 41 | def _print_report(self, cr, uid, ids, data, context=None): | ||
3077 | 42 | if context is None: | ||
3078 | 43 | context = {} | ||
3079 | 44 | data = self.pre_print_report(cr, uid, ids, data, context=context) | ||
3080 | 45 | data['form'].update(self.read(cr, uid, ids, ['display_employee'])[0]) | ||
3081 | 46 | return { | ||
3082 | 47 | 'type': 'ir.actions.report.xml', | ||
3083 | 48 | 'report_name': 'account.employee.balance', | ||
3084 | 49 | 'datas': data, | ||
3085 | 50 | } | ||
3086 | 51 | |||
3087 | 52 | |||
3088 | 53 | account_employee_balance() | ||
3089 | 54 | |||
3090 | 55 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
3091 | 0 | 56 | ||
3092 | === added file 'bin/addons/account/wizard/account_report_employee_ledger.py' | |||
3093 | --- bin/addons/account/wizard/account_report_employee_ledger.py 1970-01-01 00:00:00 +0000 | |||
3094 | +++ bin/addons/account/wizard/account_report_employee_ledger.py 2022-06-01 15:15:45 +0000 | |||
3095 | @@ -0,0 +1,127 @@ | |||
3096 | 1 | # -*- coding: utf-8 -*- | ||
3097 | 2 | ############################################################################## | ||
3098 | 3 | # | ||
3099 | 4 | # OpenERP, Open Source Management Solution | ||
3100 | 5 | # Copyright (C) 2022 TeMPO Consulting, MSF. All Rights Reserved | ||
3101 | 6 | # | ||
3102 | 7 | # This program is free software: you can redistribute it and/or modify | ||
3103 | 8 | # it under the terms of the GNU Affero General Public License as | ||
3104 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
3105 | 10 | # License, or (at your option) any later version. | ||
3106 | 11 | # | ||
3107 | 12 | # This program is distributed in the hope that it will be useful, | ||
3108 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3109 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3110 | 15 | # GNU Affero General Public License for more details. | ||
3111 | 16 | # | ||
3112 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
3113 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3114 | 19 | # | ||
3115 | 20 | ############################################################################## | ||
3116 | 21 | |||
3117 | 22 | from osv import fields, osv | ||
3118 | 23 | |||
3119 | 24 | |||
3120 | 25 | class account_employee_ledger(osv.osv_memory): | ||
3121 | 26 | """ | ||
3122 | 27 | This wizard will provide the employee Ledger report by periods, between any two dates. | ||
3123 | 28 | """ | ||
3124 | 29 | _name = 'account.employee.ledger' | ||
3125 | 30 | _inherit = 'account.common.employee.report' | ||
3126 | 31 | _description = 'Account Employee Ledger' | ||
3127 | 32 | |||
3128 | 33 | def get_payment_methods(self, cr, uid, context): | ||
3129 | 34 | pm_obj = self.pool.get('hr.payment.method') | ||
3130 | 35 | pm_ids = pm_obj.search(cr, uid, [], context=context) | ||
3131 | 36 | pm_names = pm_obj.read(cr, uid, pm_ids, ['name'], context=context) | ||
3132 | 37 | res = [('blank', '')] | ||
3133 | 38 | res += [(pm_name['name'], pm_name['name']) for pm_name in pm_names] | ||
3134 | 39 | return res | ||
3135 | 40 | |||
3136 | 41 | def get_employee_type(self, cr, uid, context): | ||
3137 | 42 | return self.pool.get('hr.employee').fields_get(cr, uid, ['employee_type'], context=context)['employee_type']['selection'] | ||
3138 | 43 | |||
3139 | 44 | _columns = { | ||
3140 | 45 | 'reconciled': fields.selection([ | ||
3141 | 46 | ('empty', ''), | ||
3142 | 47 | ('yes', 'Yes'), | ||
3143 | 48 | ('no', 'No'), | ||
3144 | 49 | ], string='Reconciled'), | ||
3145 | 50 | 'page_split': fields.boolean('One Employee Per Page', help='Display Ledger Report with One employee per page (PDF version only)'), | ||
3146 | 51 | 'employee_ids': fields.many2many('hr.employee', 'account_employee_ledger_employee_rel', 'wizard_id', 'identification_id', string='Employees', | ||
3147 | 52 | help='Display the report for specific employees only'), | ||
3148 | 53 | 'only_active_employees': fields.boolean('Only active employees', help='Display the report for active employees only'), | ||
3149 | 54 | 'instance_ids': fields.many2many('msf.instance', 'account_employee_ledger_instance_rel', 'wizard_id', 'instance_id', string='Proprietary Instances', | ||
3150 | 55 | help='Display the report for specific proprietary instances only'), | ||
3151 | 56 | 'account_ids': fields.many2many('account.account', 'account_employee_ledger_account_rel', 'wizard_id', 'account_id', string='Accounts', | ||
3152 | 57 | help='Display the report for specific accounts only'), | ||
3153 | 58 | 'display_employee': fields.selection([('all', 'All Employees'), ('with_movements', 'With movements'), | ||
3154 | 59 | ('non-zero_balance', 'With balance is not equal to 0')], | ||
3155 | 60 | string='Display Employees', required=True), | ||
3156 | 61 | 'employee_type': fields.selection(get_employee_type, string='Employee Type', required=False), | ||
3157 | 62 | 'payment_method': fields.selection(get_payment_methods, string='Method of Payment', required=False), | ||
3158 | 63 | } | ||
3159 | 64 | |||
3160 | 65 | _defaults = { | ||
3161 | 66 | 'reconciled': 'empty', | ||
3162 | 67 | 'page_split': False, | ||
3163 | 68 | 'result_selection': 'customer_supplier', | ||
3164 | 69 | 'account_domain': "[('type', 'in', ['payable', 'receivable'])]", | ||
3165 | 70 | 'only_active_employees': False, | ||
3166 | 71 | 'fiscalyear_id': False, | ||
3167 | 72 | 'display_employee': 'with_movements', | ||
3168 | 73 | 'employee_type': '', | ||
3169 | 74 | 'payment_method': 'blank', | ||
3170 | 75 | } | ||
3171 | 76 | |||
3172 | 77 | def _print_report(self, cr, uid, ids, data, context=None): | ||
3173 | 78 | if context is None: | ||
3174 | 79 | context = {} | ||
3175 | 80 | data = self.pre_print_report(cr, uid, ids, data, context=context) | ||
3176 | 81 | data['form'].update(self.read(cr, uid, ids, ['reconciled', 'page_split', 'employee_ids', | ||
3177 | 82 | 'only_active_employees', 'instance_ids', 'account_ids', | ||
3178 | 83 | 'display_employee', 'employee_type', 'payment_method'])[0]) | ||
3179 | 84 | if not data['form']['employee_type']: | ||
3180 | 85 | data['form']['employee_type'] = '' | ||
3181 | 86 | self._check_dates_fy_consistency(cr, uid, data, context) | ||
3182 | 87 | if data['form']['page_split']: | ||
3183 | 88 | return { | ||
3184 | 89 | 'type': 'ir.actions.report.xml', | ||
3185 | 90 | 'report_name': 'account.employee_ledger', | ||
3186 | 91 | 'datas': data, | ||
3187 | 92 | } | ||
3188 | 93 | return { | ||
3189 | 94 | 'type': 'ir.actions.report.xml', | ||
3190 | 95 | 'report_name': 'account.employee_ledger_other', | ||
3191 | 96 | 'datas': data, | ||
3192 | 97 | } | ||
3193 | 98 | |||
3194 | 99 | def print_report_xls(self, cr, uid, ids, data, context=None): | ||
3195 | 100 | if context is None: | ||
3196 | 101 | context = {} | ||
3197 | 102 | data = {'keep_open': 1, 'ids': context.get('active_ids', []), | ||
3198 | 103 | 'model': context.get('active_model', 'ir.ui.menu'), 'form': self.read(cr, uid, ids, | ||
3199 | 104 | ['date_from', 'date_to', | ||
3200 | 105 | 'fiscalyear_id', 'journal_ids', | ||
3201 | 106 | 'period_from', 'period_to', | ||
3202 | 107 | 'filter', 'chart_account_id', | ||
3203 | 108 | 'target_move'])[0]} | ||
3204 | 109 | used_context = self._build_contexts(cr, uid, ids, data, context=context) | ||
3205 | 110 | data['form']['periods'] = used_context.get('periods', False) and used_context['periods'] or [] | ||
3206 | 111 | data['form']['used_context'] = used_context | ||
3207 | 112 | |||
3208 | 113 | data = self.pre_print_report(cr, uid, ids, data, context=context) | ||
3209 | 114 | data['form'].update(self.read(cr, uid, ids, ['reconciled', 'page_split', 'employee_ids', | ||
3210 | 115 | 'only_active_employees', 'instance_ids', 'account_ids', | ||
3211 | 116 | 'display_employee', 'employee_type', 'payment_method'])[0]) | ||
3212 | 117 | if not data['form']['employee_type']: | ||
3213 | 118 | data['form']['employee_type'] = '' | ||
3214 | 119 | self._check_dates_fy_consistency(cr, uid, data, context) | ||
3215 | 120 | return { | ||
3216 | 121 | 'type': 'ir.actions.report.xml', | ||
3217 | 122 | 'report_name': 'account.employee_ledger_xls', | ||
3218 | 123 | 'datas': data, | ||
3219 | 124 | } | ||
3220 | 125 | |||
3221 | 126 | |||
3222 | 127 | account_employee_ledger() | ||
3223 | 0 | 128 | ||
3224 | === added file 'bin/addons/account/wizard/account_report_employee_ledger_view.xml' | |||
3225 | --- bin/addons/account/wizard/account_report_employee_ledger_view.xml 1970-01-01 00:00:00 +0000 | |||
3226 | +++ bin/addons/account/wizard/account_report_employee_ledger_view.xml 2022-06-01 15:15:45 +0000 | |||
3227 | @@ -0,0 +1,85 @@ | |||
3228 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
3229 | 2 | <openerp> | ||
3230 | 3 | <data> | ||
3231 | 4 | |||
3232 | 5 | <record id="account_employee_ledger_view" model="ir.ui.view"> | ||
3233 | 6 | <field name="name">Employee Ledger</field> | ||
3234 | 7 | <field name="model">account.employee.ledger</field> | ||
3235 | 8 | <field name="type">form</field> | ||
3236 | 9 | <field name="inherit_id" ref="account_common_report_view" /> | ||
3237 | 10 | <field name="arch" type="xml"> | ||
3238 | 11 | <data> | ||
3239 | 12 | <xpath expr="/form/label[@string='']" position="replace"> | ||
3240 | 13 | <separator string="Employee Ledger" colspan="4"/> | ||
3241 | 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."/> | ||
3242 | 15 | </xpath> | ||
3243 | 16 | <xpath expr="//field[@name='target_move']" position="after"> | ||
3244 | 17 | <field name="result_selection" on_change="onchange_result_selection(result_selection)"/> | ||
3245 | 18 | <field name="display_employee"/> | ||
3246 | 19 | <field name="page_split"/> | ||
3247 | 20 | <field name="reconciled"/> | ||
3248 | 21 | <field name="only_active_employees"/> | ||
3249 | 22 | <field name="employee_type" on_change="onchange_employee_type(employee_type)"/> | ||
3250 | 23 | <field name="payment_method" on_change="onchange_payment_method(payment_method)"/> | ||
3251 | 24 | <newline/> | ||
3252 | 25 | <field name="instance_ids" domain="[('instance_to_display_ids','=',True)]"> | ||
3253 | 26 | <tree noteditable="1"> | ||
3254 | 27 | <field name="code"/> | ||
3255 | 28 | <field name="name"/> | ||
3256 | 29 | </tree> | ||
3257 | 30 | </field> | ||
3258 | 31 | <field name="employee_ids"> | ||
3259 | 32 | <tree noteditable="1"> | ||
3260 | 33 | <field name="name_resource"/> | ||
3261 | 34 | <field name="identification_id"/> | ||
3262 | 35 | <field name="employee_type"/> | ||
3263 | 36 | </tree> | ||
3264 | 37 | </field> | ||
3265 | 38 | <field name="account_domain" invisible="1"/> | ||
3266 | 39 | <field name="account_ids" domain="account_domain"> | ||
3267 | 40 | <tree noteditable="1"> | ||
3268 | 41 | <field name="code"/> | ||
3269 | 42 | <field name="name"/> | ||
3270 | 43 | </tree> | ||
3271 | 44 | </field> | ||
3272 | 45 | </xpath> | ||
3273 | 46 | <xpath expr="//field[@name='fiscalyear_id']" position="attributes"> | ||
3274 | 47 | <attribute name="on_change">onchange_fiscalyear(fiscalyear_id)</attribute> | ||
3275 | 48 | </xpath> | ||
3276 | 49 | <xpath expr="//field[@name='period_from']" position="attributes"> | ||
3277 | 50 | <attribute name="domain">[]</attribute> | ||
3278 | 51 | </xpath> | ||
3279 | 52 | <xpath expr="//field[@name='period_to']" position="attributes"> | ||
3280 | 53 | <attribute name="domain">[]</attribute> | ||
3281 | 54 | </xpath> | ||
3282 | 55 | <xpath expr="//group[1]" position="replace"> | ||
3283 | 56 | <group col="4" colspan="4"> | ||
3284 | 57 | <button icon="gtk-print" name="check_report" string="Print PDF" type="object" colspan="2" default_focus="1" /> | ||
3285 | 58 | <button icon="gtk-print" name="print_report_xls" string="Print Excel" type="object" colspan="2" /> | ||
3286 | 59 | <button icon="gtk-cancel" special="cancel" string="Cancel" colspan="4"/> | ||
3287 | 60 | </group> | ||
3288 | 61 | </xpath> | ||
3289 | 62 | </data> | ||
3290 | 63 | </field> | ||
3291 | 64 | </record> | ||
3292 | 65 | |||
3293 | 66 | <record id="action_account_employee_ledger" model="ir.actions.act_window"> | ||
3294 | 67 | <field name="name">Employee Ledger</field> | ||
3295 | 68 | <field name="res_model">account.employee.ledger</field> | ||
3296 | 69 | <field name="type">ir.actions.act_window</field> | ||
3297 | 70 | <field name="view_type">form</field> | ||
3298 | 71 | <field name="view_mode">form</field> | ||
3299 | 72 | <field name="view_id" ref="account_employee_ledger_view"/> | ||
3300 | 73 | <field name="context">{'record_id':active_id}</field> | ||
3301 | 74 | <field name="target">new</field> | ||
3302 | 75 | </record> | ||
3303 | 76 | |||
3304 | 77 | <menuitem icon="STOCK_PRINT" | ||
3305 | 78 | name="Employee Ledger" | ||
3306 | 79 | action="action_account_employee_ledger" | ||
3307 | 80 | id="menu_account_employee_ledger" | ||
3308 | 81 | parent="account.employee_menu" | ||
3309 | 82 | sequence="1999" /> | ||
3310 | 83 | |||
3311 | 84 | </data> | ||
3312 | 85 | </openerp> | ||
3313 | 0 | 86 | ||
3314 | === modified file 'bin/addons/finance/__openerp__.py' | |||
3315 | --- bin/addons/finance/__openerp__.py 2020-12-14 16:46:05 +0000 | |||
3316 | +++ bin/addons/finance/__openerp__.py 2022-06-01 15:15:45 +0000 | |||
3317 | @@ -42,6 +42,7 @@ | |||
3318 | 42 | 'wizard/fo_follow_up_finance_wizard_view.xml', | 42 | 'wizard/fo_follow_up_finance_wizard_view.xml', |
3319 | 43 | 'cash_request_data.xml', | 43 | 'cash_request_data.xml', |
3320 | 44 | 'cash_request_view.xml', | 44 | 'cash_request_view.xml', |
3321 | 45 | 'wizard/account_report_employee_balance_tree_view.xml', # US-6392 | ||
3322 | 45 | ], | 46 | ], |
3323 | 46 | 'test': [], | 47 | 'test': [], |
3324 | 47 | 'installable': True, | 48 | 'installable': True, |
3325 | 48 | 49 | ||
3326 | === modified file 'bin/addons/finance/account_view.xml' | |||
3327 | --- bin/addons/finance/account_view.xml 2022-04-28 08:30:46 +0000 | |||
3328 | +++ bin/addons/finance/account_view.xml 2022-06-01 15:15:45 +0000 | |||
3329 | @@ -143,9 +143,19 @@ | |||
3330 | 143 | model="account.partner.balance.tree" | 143 | model="account.partner.balance.tree" |
3331 | 144 | name="account.partner.balance.tree_xls" | 144 | name="account.partner.balance.tree_xls" |
3332 | 145 | file="finance/report/account_partner_balance_tree_xls.mako" | 145 | file="finance/report/account_partner_balance_tree_xls.mako" |
3334 | 146 | report_type="webkit" | 146 | report_type="webkit" |
3335 | 147 | string="Partner Balance"/> | 147 | string="Partner Balance"/> |
3336 | 148 | 148 | ||
3337 | 149 | <report id="account_employee_balance_tree_xls" | ||
3338 | 150 | auto="False" | ||
3339 | 151 | menu="False" | ||
3340 | 152 | header="False" | ||
3341 | 153 | model="account.employee.balance.tree" | ||
3342 | 154 | name="account.employee.balance.tree_xls" | ||
3343 | 155 | file="finance/report/account_employee_balance_tree_xls.mako" | ||
3344 | 156 | report_type="webkit" | ||
3345 | 157 | string="Employee Balance"/> | ||
3346 | 158 | |||
3347 | 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"> |
3348 | 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> |
3349 | 151 | </record> | 161 | </record> |
3350 | 152 | 162 | ||
3351 | === modified file 'bin/addons/finance/report/__init__.py' | |||
3352 | --- bin/addons/finance/report/__init__.py 2020-12-15 14:17:25 +0000 | |||
3353 | +++ bin/addons/finance/report/__init__.py 2022-06-01 15:15:45 +0000 | |||
3354 | @@ -2,3 +2,4 @@ | |||
3355 | 2 | import account_report_name | 2 | import account_report_name |
3356 | 3 | import cash_request_parser | 3 | import cash_request_parser |
3357 | 4 | import fo_follow_up_finance | 4 | import fo_follow_up_finance |
3358 | 5 | import account_employee_balance_tree | ||
3359 | 5 | 6 | ||
3360 | === added file 'bin/addons/finance/report/account_employee_balance_tree.py' | |||
3361 | --- bin/addons/finance/report/account_employee_balance_tree.py 1970-01-01 00:00:00 +0000 | |||
3362 | +++ bin/addons/finance/report/account_employee_balance_tree.py 2022-06-01 15:15:45 +0000 | |||
3363 | @@ -0,0 +1,311 @@ | |||
3364 | 1 | # -*- coding: utf-8 -*- | ||
3365 | 2 | ############################################################################## | ||
3366 | 3 | # | ||
3367 | 4 | # OpenERP, Open Source Management Solution | ||
3368 | 5 | # Copyright (C) 2022 TeMPO Consulting | ||
3369 | 6 | # | ||
3370 | 7 | # This program is free software: you can redistribute it and/or modify | ||
3371 | 8 | # it under the terms of the GNU Affero General Public License as | ||
3372 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
3373 | 10 | # License, or (at your option) any later version. | ||
3374 | 11 | # | ||
3375 | 12 | # This program is distributed in the hope that it will be useful, | ||
3376 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3377 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3378 | 15 | # GNU Affero General Public License for more details. | ||
3379 | 16 | # | ||
3380 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
3381 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3382 | 19 | # | ||
3383 | 20 | ############################################################################## | ||
3384 | 21 | |||
3385 | 22 | from tools.translate import _ | ||
3386 | 23 | from report import report_sxw | ||
3387 | 24 | from spreadsheet_xml.spreadsheet_xml_write import SpreadsheetReport | ||
3388 | 25 | import pooler | ||
3389 | 26 | |||
3390 | 27 | |||
3391 | 28 | class account_employee_balance_tree(report_sxw.rml_parse): | ||
3392 | 29 | |||
3393 | 30 | def __init__(self, cr, uid, name, context=None): | ||
3394 | 31 | super(account_employee_balance_tree, self).__init__(cr, uid, name, context=context) | ||
3395 | 32 | self.aebt_obj = self.pool.get('account.employee.balance.tree') | ||
3396 | 33 | self.uid = uid | ||
3397 | 34 | self.has_data = True | ||
3398 | 35 | self.localcontext.update({ | ||
3399 | 36 | # header | ||
3400 | 37 | 'get_account': self._get_account, | ||
3401 | 38 | 'get_fiscalyear': self._get_fiscalyear, | ||
3402 | 39 | 'get_journals_str': self._get_journals_str, | ||
3403 | 40 | 'get_filter': self._get_filter, | ||
3404 | 41 | 'get_filter_info': self._get_filter_info, | ||
3405 | 42 | 'get_start_date':self._get_start_date, | ||
3406 | 43 | 'get_end_date':self._get_end_date, | ||
3407 | 44 | 'get_start_period': self.get_start_period, | ||
3408 | 45 | 'get_end_period': self.get_end_period, | ||
3409 | 46 | 'get_target_move': self._get_target_move, | ||
3410 | 47 | 'get_prop_instances_str': self._get_prop_instances_str, | ||
3411 | 48 | 'get_type_of_accounts': self._get_type_of_accounts, | ||
3412 | 49 | 'get_accounts_str': self._get_accounts_str, | ||
3413 | 50 | 'get_reconcile_selection': self._get_reconcile_selection, | ||
3414 | 51 | 'get_display_employees_selection': self._get_display_employees_selection, | ||
3415 | 52 | 'get_employee_type': self._get_employee_type, | ||
3416 | 53 | 'get_payment_methods': self._get_payment_methods, | ||
3417 | 54 | |||
3418 | 55 | # data | ||
3419 | 56 | 'get_employees': self._get_employees, | ||
3420 | 57 | 'get_employee_account_move_lines': self._get_employee_account_move_lines, | ||
3421 | 58 | 'get_lines_per_currency': self._get_lines_per_currency, | ||
3422 | 59 | 'get_employees_total_debit_credit_balance': self._get_employees_total_debit_credit_balance, | ||
3423 | 60 | 'get_has_data': self._get_has_data, | ||
3424 | 61 | }) | ||
3425 | 62 | |||
3426 | 63 | def set_context(self, objects, data, ids, report_type=None): | ||
3427 | 64 | self.display_employee = data['form'].get('display_employee', 'non-zero_balance') | ||
3428 | 65 | self.result_selection = data['form'].get('result_selection') | ||
3429 | 66 | self.target_move = data['form'].get('target_move', 'all') | ||
3430 | 67 | return super(account_employee_balance_tree, self).set_context(objects, data, ids, report_type=report_type) | ||
3431 | 68 | |||
3432 | 69 | def _get_employee_type(self, data): | ||
3433 | 70 | """ | ||
3434 | 71 | Returns the String to display in the "Employee Type" section of the report header | ||
3435 | 72 | """ | ||
3436 | 73 | emp_type = _('All') | ||
3437 | 74 | # if specific employees are selected don't display emp type | ||
3438 | 75 | if data['form'].get('employee_ids', False): | ||
3439 | 76 | emp_type = '-' | ||
3440 | 77 | else: | ||
3441 | 78 | emp = data['form'].get('employee_type', False) | ||
3442 | 79 | if emp == 'local': | ||
3443 | 80 | emp_type = _('Local Staff') | ||
3444 | 81 | if emp == 'ex': | ||
3445 | 82 | emp_type = _('Expatriate Staff') | ||
3446 | 83 | return emp_type | ||
3447 | 84 | |||
3448 | 85 | def _get_payment_methods(self, data): | ||
3449 | 86 | """ | ||
3450 | 87 | Returns the String to display in the "Payment Method" section of the report header | ||
3451 | 88 | """ | ||
3452 | 89 | pay_method = _('All') | ||
3453 | 90 | # if specific employees are selected don't display payment method | ||
3454 | 91 | if data['form'].get('employee_ids', False): | ||
3455 | 92 | pay_method = '-' | ||
3456 | 93 | else: | ||
3457 | 94 | method = data['form'].get('payment_method') | ||
3458 | 95 | if method != 'blank': | ||
3459 | 96 | return method | ||
3460 | 97 | return pay_method | ||
3461 | 98 | |||
3462 | 99 | def _get_type_of_accounts(self): | ||
3463 | 100 | if self.result_selection == 'customer': | ||
3464 | 101 | return _('Receivable Accounts') | ||
3465 | 102 | elif self.result_selection == 'supplier': | ||
3466 | 103 | return _('Payable Accounts') | ||
3467 | 104 | elif self.result_selection == 'customer_supplier': | ||
3468 | 105 | return _('Receivable and Payable Accounts') | ||
3469 | 106 | return '' | ||
3470 | 107 | |||
3471 | 108 | def _get_has_data(self): | ||
3472 | 109 | """ | ||
3473 | 110 | Returns True if there is data to display in the report | ||
3474 | 111 | """ | ||
3475 | 112 | return bool(self.has_data) | ||
3476 | 113 | |||
3477 | 114 | def _get_employees(self, data): | ||
3478 | 115 | """ return a list of 1 or 2 elements each element containing browse objects | ||
3479 | 116 | only [payable] or only [receivable] or [payable, receivable] | ||
3480 | 117 | """ | ||
3481 | 118 | res = [] | ||
3482 | 119 | objects = self.aebt_obj.get_employee_data(self.cr, self.uid, data) | ||
3483 | 120 | if objects: | ||
3484 | 121 | res.append(objects) | ||
3485 | 122 | self.has_data = len(res) | ||
3486 | 123 | return res | ||
3487 | 124 | |||
3488 | 125 | def _get_reconcile_selection(self, data): | ||
3489 | 126 | """ | ||
3490 | 127 | Returns "Yes" if "Reconciled: Yes" is selected in the wizard | ||
3491 | 128 | """ | ||
3492 | 129 | selection = _('All') | ||
3493 | 130 | if data['form'].get('reconciled', '') == 'yes': | ||
3494 | 131 | selection = _('Yes') | ||
3495 | 132 | elif data['form'].get('reconciled', '') == 'no': | ||
3496 | 133 | selection = _('No') | ||
3497 | 134 | return selection | ||
3498 | 135 | |||
3499 | 136 | def _get_display_employees_selection(self, data): | ||
3500 | 137 | """ | ||
3501 | 138 | Returns the String to display in the "Display Employees" section of the report header | ||
3502 | 139 | """ | ||
3503 | 140 | selection = '' | ||
3504 | 141 | display_employee = data['form'].get('display_employee', '') | ||
3505 | 142 | if display_employee == 'all': | ||
3506 | 143 | selection = _('All Employees') | ||
3507 | 144 | elif display_employee == 'with_movements': | ||
3508 | 145 | selection = _('With movements') | ||
3509 | 146 | elif display_employee == 'non-zero_balance': | ||
3510 | 147 | selection = _('With balance is not equal to 0') | ||
3511 | 148 | return selection | ||
3512 | 149 | |||
3513 | 150 | def _get_employee_account_move_lines(self, employee_id, data): | ||
3514 | 151 | return self.aebt_obj.get_employee_account_move_lines_data(self.cr, self.uid, employee_id, data) | ||
3515 | 152 | |||
3516 | 153 | def _get_lines_per_currency(self, employee_id, data, account_code): | ||
3517 | 154 | return self.aebt_obj.get_lines_per_currency(self.cr, self.uid, employee_id, data, account_code) | ||
3518 | 155 | |||
3519 | 156 | def _get_employees_total_debit_credit_balance(self, data): | ||
3520 | 157 | return self.aebt_obj.get_employees_total_debit_credit_balance(self.cr, self.uid, data) | ||
3521 | 158 | |||
3522 | 159 | def _get_filter_info(self, data): | ||
3523 | 160 | """ get filter info | ||
3524 | 161 | _get_filter, _get_start_date, _get_end_date, | ||
3525 | 162 | get_start_period, get_end_period | ||
3526 | 163 | are from common_report_header | ||
3527 | 164 | """ | ||
3528 | 165 | res = '' | ||
3529 | 166 | f = self._get_filter(data) | ||
3530 | 167 | if not f: | ||
3531 | 168 | return res | ||
3532 | 169 | |||
3533 | 170 | if f == _('No Filter'): | ||
3534 | 171 | res = f | ||
3535 | 172 | elif f == _('Date'): | ||
3536 | 173 | res = self.formatLang(self._get_start_date(data), date=True) + ' - ' + self.formatLang(self._get_end_date(data), date=True) | ||
3537 | 174 | elif f == _('Periods'): | ||
3538 | 175 | res = self.get_start_period(data) + ' - ' + self.get_end_period(data) | ||
3539 | 176 | return res | ||
3540 | 177 | |||
3541 | 178 | def _get_start_date(self, data): | ||
3542 | 179 | if data.get('form', False) and data['form'].get('date_from', False): | ||
3543 | 180 | return data['form']['date_from'] | ||
3544 | 181 | return '' | ||
3545 | 182 | |||
3546 | 183 | def _get_target_move(self, data): | ||
3547 | 184 | if data.get('form', False) and data['form'].get('target_move', False): | ||
3548 | 185 | if data['form']['target_move'] == 'all': | ||
3549 | 186 | return _('All Entries') | ||
3550 | 187 | return _('All Posted Entries') | ||
3551 | 188 | return '' | ||
3552 | 189 | |||
3553 | 190 | def _get_end_date(self, data): | ||
3554 | 191 | if data.get('form', False) and data['form'].get('date_to', False): | ||
3555 | 192 | return data['form']['date_to'] | ||
3556 | 193 | return '' | ||
3557 | 194 | |||
3558 | 195 | def get_start_period(self, data): | ||
3559 | 196 | if data.get('form', False) and data['form'].get('period_from', False): | ||
3560 | 197 | return self.pool.get('account.period').browse(self.cr,self.uid,data['form']['period_from']).name | ||
3561 | 198 | return '' | ||
3562 | 199 | |||
3563 | 200 | def get_end_period(self, data): | ||
3564 | 201 | if data.get('form', False) and data['form'].get('period_to', False): | ||
3565 | 202 | return self.pool.get('account.period').browse(self.cr, self.uid, data['form']['period_to']).name | ||
3566 | 203 | return '' | ||
3567 | 204 | |||
3568 | 205 | def _get_account(self, data): | ||
3569 | 206 | if data.get('form', False) and data['form'].get('chart_account_id', False): | ||
3570 | 207 | return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).name | ||
3571 | 208 | return '' | ||
3572 | 209 | |||
3573 | 210 | def _get_accounts(self, data): | ||
3574 | 211 | """ | ||
3575 | 212 | Returns: | ||
3576 | 213 | - "All Accounts" if no specific account is selected | ||
3577 | 214 | - or the codes of all accounts selected | ||
3578 | 215 | """ | ||
3579 | 216 | account_ids = data.get('form', False) and data['form'].get('account_ids', False) | ||
3580 | 217 | if account_ids: | ||
3581 | 218 | account_obj = pooler.get_pool(self.cr.dbname).get('account.account') | ||
3582 | 219 | return [i.code for i in account_obj.browse(self.cr, self.uid, account_ids, | ||
3583 | 220 | fields_to_fetch=['code'], context=data.get('context', {}))] | ||
3584 | 221 | return [_('All Accounts')] | ||
3585 | 222 | |||
3586 | 223 | def _get_accounts_str(self, data): | ||
3587 | 224 | """ | ||
3588 | 225 | Returns the list of accounts as a String (cut if > 300 characters) | ||
3589 | 226 | """ | ||
3590 | 227 | data_tools_obj = self.pool.get('data.tools') | ||
3591 | 228 | return data_tools_obj.truncate_list(self._get_accounts(data)) | ||
3592 | 229 | |||
3593 | 230 | def _get_filter(self, data): | ||
3594 | 231 | if data.get('form', False) and data['form'].get('filter', False): | ||
3595 | 232 | if data['form']['filter'] == 'filter_date': | ||
3596 | 233 | return _('Date') | ||
3597 | 234 | elif data['form']['filter'] == 'filter_period': | ||
3598 | 235 | return _('Periods') | ||
3599 | 236 | return _('No Filter') | ||
3600 | 237 | |||
3601 | 238 | def _get_fiscalyear(self, data): | ||
3602 | 239 | if data.get('form', False) and data['form'].get('fiscalyear_id', False): | ||
3603 | 240 | return self.pool.get('account.fiscalyear').browse(self.cr, self.uid, data['form']['fiscalyear_id']).name | ||
3604 | 241 | return '' | ||
3605 | 242 | |||
3606 | 243 | def _get_company(self, data): | ||
3607 | 244 | if data.get('form', False) and data['form'].get('chart_account_id', False): | ||
3608 | 245 | return self.pool.get.get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.name | ||
3609 | 246 | return '' | ||
3610 | 247 | |||
3611 | 248 | def _get_journal(self, data): | ||
3612 | 249 | """ | ||
3613 | 250 | Returns the codes of the journals selected (or "All Journals") | ||
3614 | 251 | """ | ||
3615 | 252 | if data.get('form', False) and 'all_journals' in data['form']: | ||
3616 | 253 | return [_('All Journals')] | ||
3617 | 254 | codes = [] | ||
3618 | 255 | if data.get('form', False) and data['form'].get('journal_ids', False): | ||
3619 | 256 | self.cr.execute('select distinct(code) from account_journal where id IN %s', (tuple(data['form']['journal_ids']),)) | ||
3620 | 257 | codes = [x for x, in self.cr.fetchall()] | ||
3621 | 258 | return codes | ||
3622 | 259 | |||
3623 | 260 | def _get_journals_str(self, data): | ||
3624 | 261 | """ | ||
3625 | 262 | Returns the list of journals as a String (cut if > 300 characters) | ||
3626 | 263 | """ | ||
3627 | 264 | data_tools_obj = self.pool.get('data.tools') | ||
3628 | 265 | return data_tools_obj.truncate_list(self._get_journal(data)) | ||
3629 | 266 | |||
3630 | 267 | def _get_prop_instances(self, data): | ||
3631 | 268 | """ | ||
3632 | 269 | Returns the codes of the instances selected (or "All Instances") | ||
3633 | 270 | """ | ||
3634 | 271 | if data.get('form', False) and data['form'].get('instance_ids', False): | ||
3635 | 272 | self.cr.execute('select code from msf_instance where id IN %s',(tuple(data['form']['instance_ids']),)) | ||
3636 | 273 | return [lt or '' for lt, in self.cr.fetchall()] | ||
3637 | 274 | return [_('All Instances')] | ||
3638 | 275 | |||
3639 | 276 | def _get_prop_instances_str(self, data, pdf=False): | ||
3640 | 277 | """ | ||
3641 | 278 | Returns the list of instances as a String (cut if > 300 characters) | ||
3642 | 279 | """ | ||
3643 | 280 | display_limit = 300 | ||
3644 | 281 | if pdf: | ||
3645 | 282 | # in the PDF version instances are listed one below the other and instance names are cut if > 20 characters | ||
3646 | 283 | instances_str = ',\n'.join([(len(inst) <= 20) and inst or ("%s%s" % (inst[:17], '...')) | ||
3647 | 284 | for inst in self._get_prop_instances(data)]) | ||
3648 | 285 | if len(instances_str) > display_limit: | ||
3649 | 286 | instances_str = "%s%s" % (instances_str[:display_limit-3], '...') | ||
3650 | 287 | else: | ||
3651 | 288 | # otherwise instances are simply separated by a comma | ||
3652 | 289 | data_tools_obj = self.pool.get('data.tools') | ||
3653 | 290 | instances_str = data_tools_obj.truncate_list(self._get_prop_instances(data), limit=display_limit) | ||
3654 | 291 | return instances_str | ||
3655 | 292 | |||
3656 | 293 | |||
3657 | 294 | class account_employee_balance_tree_xls(SpreadsheetReport): | ||
3658 | 295 | def __init__(self, name, table, rml=False, parser=report_sxw.rml_parse, header='external', store=False): | ||
3659 | 296 | super(account_employee_balance_tree_xls, self).__init__(name, table, rml=rml, parser=parser, header=header, store=store) | ||
3660 | 297 | |||
3661 | 298 | def create(self, cr, uid, ids, data, context=None): | ||
3662 | 299 | a = super(account_employee_balance_tree_xls, self).create(cr, uid, ids, data, context) | ||
3663 | 300 | return (a[0], 'xls') | ||
3664 | 301 | |||
3665 | 302 | |||
3666 | 303 | # XLS report | ||
3667 | 304 | account_employee_balance_tree_xls('report.account.employee.balance.tree_xls', 'account.employee.balance.tree', | ||
3668 | 305 | 'finance/report/account_employee_balance_tree_xls.mako', | ||
3669 | 306 | parser=account_employee_balance_tree, header='internal') | ||
3670 | 307 | # PDF report | ||
3671 | 308 | report_sxw.report_sxw('report.account.employee.balance', 'hr.employee', 'account/report/account_employee_balance.rml', | ||
3672 | 309 | parser=account_employee_balance_tree, header='internal') | ||
3673 | 310 | |||
3674 | 311 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
3675 | 0 | 312 | ||
3676 | === added file 'bin/addons/finance/report/account_employee_balance_tree_xls.mako' | |||
3677 | --- bin/addons/finance/report/account_employee_balance_tree_xls.mako 1970-01-01 00:00:00 +0000 | |||
3678 | +++ bin/addons/finance/report/account_employee_balance_tree_xls.mako 2022-06-01 15:15:45 +0000 | |||
3679 | @@ -0,0 +1,530 @@ | |||
3680 | 1 | <?xml version="1.0"?> | ||
3681 | 2 | <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" | ||
3682 | 3 | xmlns:o="urn:schemas-microsoft-com:office:office" | ||
3683 | 4 | xmlns:x="urn:schemas-microsoft-com:office:excel" | ||
3684 | 5 | xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" | ||
3685 | 6 | xmlns:html="http://www.w3.org/TR/REC-html40"> | ||
3686 | 7 | <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> | ||
3687 | 8 | <Title>Employee</Title> | ||
3688 | 9 | </DocumentProperties> | ||
3689 | 10 | <Styles> | ||
3690 | 11 | <Style ss:ID="ssCell"> | ||
3691 | 12 | <Alignment ss:Vertical="Top" ss:WrapText="1"/> | ||
3692 | 13 | </Style> | ||
3693 | 14 | <Style ss:ID="ssCellRight"> | ||
3694 | 15 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
3695 | 16 | </Style> | ||
3696 | 17 | <Style ss:ID="ssCellRightBold"> | ||
3697 | 18 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
3698 | 19 | <Font ss:Bold="1" /> | ||
3699 | 20 | </Style> | ||
3700 | 21 | <Style ss:ID="ssH"> | ||
3701 | 22 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> | ||
3702 | 23 | <Font ss:Bold="1" /> | ||
3703 | 24 | <Borders> | ||
3704 | 25 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3705 | 26 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3706 | 27 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3707 | 28 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3708 | 29 | </Borders> | ||
3709 | 30 | </Style> | ||
3710 | 31 | <Style ss:ID="ssBorder"> | ||
3711 | 32 | <Alignment ss:Vertical="Center" ss:WrapText="1"/> | ||
3712 | 33 | <Borders> | ||
3713 | 34 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3714 | 35 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3715 | 36 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3716 | 37 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3717 | 38 | </Borders> | ||
3718 | 39 | </Style> | ||
3719 | 40 | <Style ss:ID="ssBorderTop"> | ||
3720 | 41 | <Borders> | ||
3721 | 42 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3722 | 43 | </Borders> | ||
3723 | 44 | </Style> | ||
3724 | 45 | <Style ss:ID="ssBorderDate"> | ||
3725 | 46 | <Alignment ss:Vertical="Center" ss:WrapText="1"/> | ||
3726 | 47 | <Borders> | ||
3727 | 48 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3728 | 49 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3729 | 50 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3730 | 51 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3731 | 52 | </Borders> | ||
3732 | 53 | <NumberFormat ss:Format="Short Date" /> | ||
3733 | 54 | </Style> | ||
3734 | 55 | <Style ss:ID="ssNumber"> | ||
3735 | 56 | <Borders> | ||
3736 | 57 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3737 | 58 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3738 | 59 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3739 | 60 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3740 | 61 | </Borders> | ||
3741 | 62 | <Alignment ss:Horizontal="Right" ss:Vertical="Center" ss:WrapText="1"/> | ||
3742 | 63 | <NumberFormat ss:Format="#,##0.00"/> | ||
3743 | 64 | </Style> | ||
3744 | 65 | <Style ss:ID="ssHeader"> | ||
3745 | 66 | <Alignment ss:Vertical="Top" ss:Horizontal="Center" ss:WrapText="1"/> | ||
3746 | 67 | <Font ss:Bold="1" /> | ||
3747 | 68 | <Borders> | ||
3748 | 69 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3749 | 70 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3750 | 71 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3751 | 72 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3752 | 73 | </Borders> | ||
3753 | 74 | </Style> | ||
3754 | 75 | <Style ss:ID="ssHeaderNumber"> | ||
3755 | 76 | <Font ss:Bold="1" /> | ||
3756 | 77 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
3757 | 78 | <Borders> | ||
3758 | 79 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3759 | 80 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3760 | 81 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3761 | 82 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3762 | 83 | </Borders> | ||
3763 | 84 | <NumberFormat ss:Format="#,##0.00"/> | ||
3764 | 85 | </Style> | ||
3765 | 86 | <Style ss:ID="ssHeaderRight"> | ||
3766 | 87 | <Font ss:Bold="1" /> | ||
3767 | 88 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
3768 | 89 | <Borders> | ||
3769 | 90 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3770 | 91 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3771 | 92 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3772 | 93 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3773 | 94 | </Borders> | ||
3774 | 95 | </Style> | ||
3775 | 96 | <Style ss:ID="ssHeaderCell"> | ||
3776 | 97 | <Alignment ss:Vertical="Top" ss:Horizontal="Center" ss:WrapText="1"/> | ||
3777 | 98 | <Borders> | ||
3778 | 99 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3779 | 100 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3780 | 101 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3781 | 102 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3782 | 103 | </Borders> | ||
3783 | 104 | </Style> | ||
3784 | 105 | <Style ss:ID="ssHeaderNumberCell"> | ||
3785 | 106 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
3786 | 107 | <Borders> | ||
3787 | 108 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3788 | 109 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3789 | 110 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3790 | 111 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3791 | 112 | </Borders> | ||
3792 | 113 | <NumberFormat ss:Format="#,##0.00"/> | ||
3793 | 114 | </Style> | ||
3794 | 115 | <Style ss:ID="ssEmployee"> | ||
3795 | 116 | <Alignment ss:Vertical="Top" ss:WrapText="1"/> | ||
3796 | 117 | <Font ss:Bold="1" /> | ||
3797 | 118 | <Borders> | ||
3798 | 119 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3799 | 120 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3800 | 121 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3801 | 122 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3802 | 123 | </Borders> | ||
3803 | 124 | </Style> | ||
3804 | 125 | <Style ss:ID="ssEmployeeNumber"> | ||
3805 | 126 | <Font ss:Bold="1" /> | ||
3806 | 127 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
3807 | 128 | <Borders> | ||
3808 | 129 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3809 | 130 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3810 | 131 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3811 | 132 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3812 | 133 | </Borders> | ||
3813 | 134 | <NumberFormat ss:Format="#,##0.00"/> | ||
3814 | 135 | </Style> | ||
3815 | 136 | <Style ss:ID="ssEmployeeRight"> | ||
3816 | 137 | <Font ss:Bold="1" /> | ||
3817 | 138 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
3818 | 139 | <Borders> | ||
3819 | 140 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3820 | 141 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3821 | 142 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3822 | 143 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3823 | 144 | </Borders> | ||
3824 | 145 | </Style> | ||
3825 | 146 | <Style ss:ID="ssAccountLine"> | ||
3826 | 147 | <Alignment ss:Vertical="Top" ss:Horizontal="Left" ss:WrapText="1"/> | ||
3827 | 148 | <Font ss:Size="8"/> | ||
3828 | 149 | <Borders> | ||
3829 | 150 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3830 | 151 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3831 | 152 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3832 | 153 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3833 | 154 | </Borders> | ||
3834 | 155 | </Style> | ||
3835 | 156 | <Style ss:ID="ssAccountLineRight"> | ||
3836 | 157 | <Alignment ss:Vertical="Top" ss:Horizontal="Right" ss:WrapText="1"/> | ||
3837 | 158 | <Font ss:Size="8"/> | ||
3838 | 159 | <Borders> | ||
3839 | 160 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3840 | 161 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3841 | 162 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3842 | 163 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3843 | 164 | </Borders> | ||
3844 | 165 | </Style> | ||
3845 | 166 | <Style ss:ID="ssSubtotalLine"> | ||
3846 | 167 | <Alignment ss:Vertical="Top" ss:Horizontal="Right" ss:WrapText="1"/> | ||
3847 | 168 | <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11"/> | ||
3848 | 169 | <Borders> | ||
3849 | 170 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3850 | 171 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3851 | 172 | </Borders> | ||
3852 | 173 | </Style> | ||
3853 | 174 | <Style ss:ID="ssAccountLineWrap"> | ||
3854 | 175 | <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1"/> | ||
3855 | 176 | <Borders> | ||
3856 | 177 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
3857 | 178 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
3858 | 179 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
3859 | 180 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
3860 | 181 | </Borders> | ||
3861 | 182 | <Font ss:Size="8"/> | ||
3862 | 183 | <Interior/> | ||
3863 | 184 | <NumberFormat/> | ||
3864 | 185 | <Protection/> | ||
3865 | 186 | </Style> | ||
3866 | 187 | <Style ss:ID="ssAccountLineNumber"> | ||
3867 | 188 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
3868 | 189 | <Font ss:Size="8"/> | ||
3869 | 190 | <Borders> | ||
3870 | 191 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3871 | 192 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3872 | 193 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3873 | 194 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3874 | 195 | </Borders> | ||
3875 | 196 | <NumberFormat ss:Format="#,##0.00"/> | ||
3876 | 197 | </Style> | ||
3877 | 198 | <Style ss:ID="ssAccountLineNumberBold"> | ||
3878 | 199 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
3879 | 200 | <Font ss:Size="8" ss:Bold="1"/> | ||
3880 | 201 | <Borders> | ||
3881 | 202 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3882 | 203 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3883 | 204 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3884 | 205 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3885 | 206 | </Borders> | ||
3886 | 207 | <NumberFormat ss:Format="#,##0.00"/> | ||
3887 | 208 | </Style> | ||
3888 | 209 | <Style ss:ID="ssSubtotalLineNumber"> | ||
3889 | 210 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
3890 | 211 | <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11"/> | ||
3891 | 212 | <Borders> | ||
3892 | 213 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3893 | 214 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3894 | 215 | </Borders> | ||
3895 | 216 | <NumberFormat ss:Format="#,##0.00"/> | ||
3896 | 217 | </Style> | ||
3897 | 218 | <Style ss:ID="ssAccountLineAccountCode"> | ||
3898 | 219 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
3899 | 220 | <Font ss:Size="8"/> | ||
3900 | 221 | <Borders> | ||
3901 | 222 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3902 | 223 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3903 | 224 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3904 | 225 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3905 | 226 | </Borders> | ||
3906 | 227 | <Interior/> | ||
3907 | 228 | <NumberFormat ss:Format="0" /> | ||
3908 | 229 | <Protection/> | ||
3909 | 230 | </Style> | ||
3910 | 231 | <Style ss:ID="ssAccountLineAccountCodeBold"> | ||
3911 | 232 | <Alignment ss:Horizontal="Right" ss:Vertical="Top" ss:WrapText="1"/> | ||
3912 | 233 | <Font ss:Size="8" ss:Bold="1"/> | ||
3913 | 234 | <Borders> | ||
3914 | 235 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3915 | 236 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3916 | 237 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3917 | 238 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
3918 | 239 | </Borders> | ||
3919 | 240 | <Interior/> | ||
3920 | 241 | <NumberFormat ss:Format="0" /> | ||
3921 | 242 | <Protection/> | ||
3922 | 243 | </Style> | ||
3923 | 244 | </Styles> | ||
3924 | 245 | <% | ||
3925 | 246 | entries = get_employees(data) | ||
3926 | 247 | %> | ||
3927 | 248 | % if not entries: | ||
3928 | 249 | <Worksheet ss:Name="No entries"> | ||
3929 | 250 | <Table x:FullColumns="1" x:FullRows="1"> | ||
3930 | 251 | <Column ss:AutoFitWidth="1" ss:Width="300" /> | ||
3931 | 252 | <Row> | ||
3932 | 253 | <Cell ss:StyleID="ssHeader"><Data ss:Type="String">No entries</Data></Cell> | ||
3933 | 254 | </Row> | ||
3934 | 255 | </Table> | ||
3935 | 256 | </Worksheet> | ||
3936 | 257 | % else: | ||
3937 | 258 | % for p_entries in entries: | ||
3938 | 259 | <% | ||
3939 | 260 | worksheet_name = get_type_of_accounts() | ||
3940 | 261 | %> | ||
3941 | 262 | <Worksheet ss:Name="${worksheet_name}"> | ||
3942 | 263 | <% | ||
3943 | 264 | col_count = 9 | ||
3944 | 265 | if data['model'] == 'account.account': | ||
3945 | 266 | header_company_or_chart_of_account = _('Company') | ||
3946 | 267 | else: | ||
3947 | 268 | header_company_or_chart_of_account = _('Chart of Account') | ||
3948 | 269 | %> | ||
3949 | 270 | <Table x:FullColumns="1" x:FullRows="1"> | ||
3950 | 271 | <Column ss:AutoFitWidth="1" ss:Width="150" /> | ||
3951 | 272 | <Column ss:AutoFitWidth="1" ss:Width="60" /> | ||
3952 | 273 | <Column ss:AutoFitWidth="1" ss:Width="120" /> | ||
3953 | 274 | <Column ss:AutoFitWidth="1" ss:Width="120" /> | ||
3954 | 275 | <Column ss:AutoFitWidth="1" ss:Width="120" /> | ||
3955 | 276 | <Column ss:AutoFitWidth="1" ss:Width="100" /> | ||
3956 | 277 | <Column ss:AutoFitWidth="1" ss:Width="100" /> | ||
3957 | 278 | <Column ss:AutoFitWidth="1" ss:Width="100" /> | ||
3958 | 279 | <Column ss:AutoFitWidth="1" ss:Width="100" /> | ||
3959 | 280 | ## header | ||
3960 | 281 | <% | ||
3961 | 282 | header_col_merge_count = col_count - 1 | ||
3962 | 283 | selected_filter = get_filter(data) or '' | ||
3963 | 284 | %> | ||
3964 | 285 | <Row> | ||
3965 | 286 | <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${header_company_or_chart_of_account}</Data></Cell> | ||
3966 | 287 | <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Fiscal Year')}</Data></Cell> | ||
3967 | 288 | <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Journals')}</Data></Cell> | ||
3968 | 289 | <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Accounts')}</Data></Cell> | ||
3969 | 290 | <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Proprietary Instances')}</Data></Cell> | ||
3970 | 291 | <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${'%s %s' % (_('Filter By'), (selected_filter != _('No Filter') and selected_filter or ''))|x}</Data></Cell> | ||
3971 | 292 | <Cell ss:StyleID="ssHeader" ss:MergeAcross="1"><Data ss:Type="String">${_('Display')}</Data></Cell> | ||
3972 | 293 | <Cell ss:StyleID="ssHeader"><Data ss:Type="String">${_('Func. Currency')}</Data></Cell> | ||
3973 | 294 | </Row> | ||
3974 | 295 | <Row> | ||
3975 | 296 | <Cell ss:StyleID="ssHeaderCell"> | ||
3976 | 297 | <Data ss:Type="String">${(get_account(data) or '')|x}</Data> | ||
3977 | 298 | </Cell> | ||
3978 | 299 | <Cell ss:StyleID="ssHeaderCell"> | ||
3979 | 300 | <Data ss:Type="String">${(get_fiscalyear(data) or '')|x}</Data> | ||
3980 | 301 | </Cell> | ||
3981 | 302 | <Cell ss:StyleID="ssHeaderCell"> | ||
3982 | 303 | <Data ss:Type="String">${ get_journals_str(data)|x}</Data> | ||
3983 | 304 | </Cell> | ||
3984 | 305 | <Cell ss:StyleID="ssHeaderCell"> | ||
3985 | 306 | <Data ss:Type="String">${ get_accounts_str(data)|x}</Data> | ||
3986 | 307 | </Cell> | ||
3987 | 308 | <Cell ss:StyleID="ssHeaderCell"> | ||
3988 | 309 | <Data ss:Type="String">${ get_prop_instances_str(data)|x}</Data> | ||
3989 | 310 | </Cell> | ||
3990 | 311 | <Cell ss:StyleID="ssHeaderCell"> | ||
3991 | 312 | <Data ss:Type="String">${(get_filter_info(data) or '')|x}</Data> | ||
3992 | 313 | </Cell> | ||
3993 | 314 | <Cell ss:StyleID="ssHeaderCell" ss:MergeAcross="1"> | ||
3994 | 315 | <Data ss:Type="String">${ "%s: %s, %s: %s, %s: %s, %s: %s, %s: %s, %s: %s" % ( | ||
3995 | 316 | _("Employee's"), get_type_of_accounts() or '', | ||
3996 | 317 | _('Target Moves'), get_target_move(data) or '', | ||
3997 | 318 | _('Reconciled'), get_reconcile_selection(data), | ||
3998 | 319 | _('Display Employees'), get_display_employees_selection(data), | ||
3999 | 320 | _('Employee Type'), get_employee_type(data) or '-', | ||
4000 | 321 | _('Payment Method'), get_payment_methods(data) or '-', | ||
4001 | 322 | )|x}</Data> | ||
4002 | 323 | </Cell> | ||
4003 | 324 | <Cell ss:StyleID="ssHeaderCell"> | ||
4004 | 325 | <Data ss:Type="String">${company.currency_id.name|x}</Data> | ||
4005 | 326 | </Cell> | ||
4006 | 327 | </Row> | ||
4007 | 328 | ## separation line after header | ||
4008 | 329 | <Row> | ||
4009 | 330 | % for n in range(col_count): | ||
4010 | 331 | <Cell ss:StyleID="ssCell"> | ||
4011 | 332 | <Data ss:Type="String"></Data> | ||
4012 | 333 | </Cell> | ||
4013 | 334 | % endfor | ||
4014 | 335 | </Row> | ||
4015 | 336 | ## employee header | ||
4016 | 337 | <Row> | ||
4017 | 338 | <Cell ss:StyleID="ssHeader" ss:MergeAcross="2"> | ||
4018 | 339 | <Data ss:Type="String">${_('Employee')}</Data> | ||
4019 | 340 | </Cell> | ||
4020 | 341 | <Cell ss:StyleID="ssHeaderRight"> | ||
4021 | 342 | <Data ss:Type="String">${_('Account')}</Data> | ||
4022 | 343 | </Cell> | ||
4023 | 344 | <Cell ss:StyleID="ssHeaderRight"> | ||
4024 | 345 | <Data ss:Type="String">${_('Currency')}</Data> | ||
4025 | 346 | </Cell> | ||
4026 | 347 | <Cell ss:StyleID="ssHeaderRight"> | ||
4027 | 348 | <Data ss:Type="String">${_('Debit')}</Data> | ||
4028 | 349 | </Cell> | ||
4029 | 350 | <Cell ss:StyleID="ssHeaderRight"> | ||
4030 | 351 | <Data ss:Type="String">${_('Credit')}</Data> | ||
4031 | 352 | </Cell> | ||
4032 | 353 | <Cell ss:StyleID="ssHeaderRight"> | ||
4033 | 354 | <Data ss:Type="String">${_('Booking Balance')}</Data> | ||
4034 | 355 | </Cell> | ||
4035 | 356 | <Cell ss:StyleID="ssHeaderRight"> | ||
4036 | 357 | <Data ss:Type="String">${'%s %s' % (_('Balance'), company.currency_id.name)|x}</Data> | ||
4037 | 358 | </Cell> | ||
4038 | 359 | </Row> | ||
4039 | 360 | |||
4040 | 361 | <Row> | ||
4041 | 362 | ## total debit / credit / balance row | ||
4042 | 363 | <% | ||
4043 | 364 | debit, credit, balance = get_employees_total_debit_credit_balance(data) | ||
4044 | 365 | %> | ||
4045 | 366 | <Cell ss:StyleID="ssCellRightBold" ss:MergeAcross="3"> | ||
4046 | 367 | <Data ss:Type="String">${_('TOTAL EMPLOYEES')}</Data> | ||
4047 | 368 | </Cell> | ||
4048 | 369 | <Cell ss:StyleID="ssEmployeeRight"> | ||
4049 | 370 | <Data ss:Type="String">${company.currency_id.name|x}</Data> | ||
4050 | 371 | </Cell> | ||
4051 | 372 | <Cell ss:StyleID="ssHeaderNumber"> | ||
4052 | 373 | <Data ss:Type="Number">${debit or 0.|x}</Data> | ||
4053 | 374 | </Cell> | ||
4054 | 375 | <Cell ss:StyleID="ssHeaderNumber"> | ||
4055 | 376 | <Data ss:Type="Number">${credit or 0.|x}</Data> | ||
4056 | 377 | </Cell> | ||
4057 | 378 | <Cell ss:StyleID="ssHeaderNumber"> | ||
4058 | 379 | <Data ss:Type="String">-</Data> | ||
4059 | 380 | </Cell> | ||
4060 | 381 | <Cell ss:StyleID="ssHeaderNumber"> | ||
4061 | 382 | <Data ss:Type="Number">${balance or 0.|x}</Data> | ||
4062 | 383 | </Cell> | ||
4063 | 384 | </Row> | ||
4064 | 385 | |||
4065 | 386 | ## employee row | ||
4066 | 387 | % for p_obj in p_entries: | ||
4067 | 388 | <% | ||
4068 | 389 | employee_name = (p_obj.name or '') | ||
4069 | 390 | %> | ||
4070 | 391 | <Row> | ||
4071 | 392 | <Cell ss:StyleID="ssEmployee" ss:MergeAcross="3"> | ||
4072 | 393 | <Data ss:Type="String">${employee_name|x}</Data> | ||
4073 | 394 | </Cell> | ||
4074 | 395 | <Cell ss:StyleID="ssEmployeeRight"> | ||
4075 | 396 | <Data ss:Type="String">${company.currency_id.name|x}</Data> | ||
4076 | 397 | </Cell> | ||
4077 | 398 | <Cell ss:StyleID="ssEmployeeNumber"> | ||
4078 | 399 | <Data ss:Type="Number">${p_obj.debit or 0.|x}</Data> | ||
4079 | 400 | </Cell> | ||
4080 | 401 | <Cell ss:StyleID="ssEmployeeNumber"> | ||
4081 | 402 | <Data ss:Type="Number">${p_obj.credit or 0.|x}</Data> | ||
4082 | 403 | </Cell> | ||
4083 | 404 | <Cell ss:StyleID="ssEmployeeNumber"> | ||
4084 | 405 | <Data ss:Type="Number">${p_obj.balance or 0.|x}</Data> | ||
4085 | 406 | </Cell> | ||
4086 | 407 | <Cell ss:StyleID="ssEmployeeNumber"> | ||
4087 | 408 | <Data ss:Type="Number">${p_obj.balance or 0.|x}</Data> | ||
4088 | 409 | </Cell> | ||
4089 | 410 | </Row> | ||
4090 | 411 | |||
4091 | 412 | ## account move line row | ||
4092 | 413 | % for aml in get_employee_account_move_lines(p_obj.employee_id.id, data): | ||
4093 | 414 | <Row> | ||
4094 | 415 | <Cell ss:StyleID="ssAccountLine"> | ||
4095 | 416 | <Data ss:Type="String"></Data> | ||
4096 | 417 | </Cell> | ||
4097 | 418 | <Cell ss:StyleID="ssAccountLine"> | ||
4098 | 419 | <Data ss:Type="String"></Data> | ||
4099 | 420 | </Cell> | ||
4100 | 421 | <Cell ss:StyleID="ssAccountLine"> | ||
4101 | 422 | <Data ss:Type="String"></Data> | ||
4102 | 423 | </Cell> | ||
4103 | 424 | <Cell ss:StyleID="ssAccountLineAccountCodeBold"> | ||
4104 | 425 | <Data ss:Type="String">${aml.get('account', '')|x}</Data> | ||
4105 | 426 | </Cell> | ||
4106 | 427 | <Cell ss:StyleID="ssAccountLineAccountCodeBold"> | ||
4107 | 428 | <Data ss:Type="String">${company.currency_id.name|x}</Data> | ||
4108 | 429 | </Cell> | ||
4109 | 430 | <Cell ss:StyleID="ssAccountLineNumberBold"> | ||
4110 | 431 | <Data ss:Type="Number">${aml.get('deb') or 0.|x}</Data> | ||
4111 | 432 | </Cell> | ||
4112 | 433 | <Cell ss:StyleID="ssAccountLineNumberBold"> | ||
4113 | 434 | <Data ss:Type="Number">${aml.get('cred') or 0.|x}</Data> | ||
4114 | 435 | </Cell> | ||
4115 | 436 | <Cell ss:StyleID="ssAccountLineNumberBold"> | ||
4116 | 437 | <Data ss:Type="Number">${aml.get('total') or 0.|x}</Data> | ||
4117 | 438 | </Cell> | ||
4118 | 439 | <Cell ss:StyleID="ssAccountLineNumberBold"> | ||
4119 | 440 | <Data ss:Type="Number">${aml.get('total') or 0.|x}</Data> | ||
4120 | 441 | </Cell> | ||
4121 | 442 | </Row> | ||
4122 | 443 | |||
4123 | 444 | <!-- SUBTOTALS per currency --> | ||
4124 | 445 | % for detail_line in get_lines_per_currency(p_obj.employee_id.id, data, aml.get('account', '')): | ||
4125 | 446 | <Row> | ||
4126 | 447 | <Cell ss:StyleID="ssSubtotalLine" ss:MergeAcross="2"> | ||
4127 | 448 | <Data ss:Type="String"></Data> | ||
4128 | 449 | </Cell> | ||
4129 | 450 | <Cell ss:StyleID="ssSubtotalLine"> | ||
4130 | 451 | <Data ss:Type="String">${_('Subtotal')}</Data> | ||
4131 | 452 | </Cell> | ||
4132 | 453 | <Cell ss:StyleID="ssSubtotalLine"> | ||
4133 | 454 | <Data ss:Type="String">${detail_line.get('currency_booking', '')|x}</Data> | ||
4134 | 455 | </Cell> | ||
4135 | 456 | <Cell ss:StyleID="ssSubtotalLineNumber"> | ||
4136 | 457 | <Data ss:Type="Number">${detail_line.get('debit_booking') or 0.|x}</Data> | ||
4137 | 458 | </Cell> | ||
4138 | 459 | <Cell ss:StyleID="ssSubtotalLineNumber"> | ||
4139 | 460 | <Data ss:Type="Number">${detail_line.get('credit_booking') or 0.|x}</Data> | ||
4140 | 461 | </Cell> | ||
4141 | 462 | <Cell ss:StyleID="ssSubtotalLineNumber"> | ||
4142 | 463 | <Data ss:Type="Number">${detail_line.get('total_booking') or 0.|x}</Data> | ||
4143 | 464 | </Cell> | ||
4144 | 465 | <Cell ss:StyleID="ssSubtotalLineNumber"> | ||
4145 | 466 | <Data ss:Type="Number">${detail_line.get('total_functional') or 0.|x}</Data> | ||
4146 | 467 | </Cell> | ||
4147 | 468 | </Row> | ||
4148 | 469 | % endfor | ||
4149 | 470 | % endfor | ||
4150 | 471 | % endfor | ||
4151 | 472 | <Row> | ||
4152 | 473 | <Cell ss:StyleID="ssBorderTop"> | ||
4153 | 474 | <Data ss:Type="String"></Data> | ||
4154 | 475 | </Cell> | ||
4155 | 476 | <Cell ss:StyleID="ssBorderTop"> | ||
4156 | 477 | <Data ss:Type="String"></Data> | ||
4157 | 478 | </Cell> | ||
4158 | 479 | <Cell ss:StyleID="ssBorderTop"> | ||
4159 | 480 | <Data ss:Type="String"></Data> | ||
4160 | 481 | </Cell> | ||
4161 | 482 | <Cell ss:StyleID="ssBorderTop"> | ||
4162 | 483 | <Data ss:Type="String"></Data> | ||
4163 | 484 | </Cell> | ||
4164 | 485 | <Cell ss:StyleID="ssBorderTop"> | ||
4165 | 486 | <Data ss:Type="String"></Data> | ||
4166 | 487 | </Cell> | ||
4167 | 488 | <Cell ss:StyleID="ssBorderTop"> | ||
4168 | 489 | <Data ss:Type="String"></Data> | ||
4169 | 490 | </Cell> | ||
4170 | 491 | <Cell ss:StyleID="ssBorderTop"> | ||
4171 | 492 | <Data ss:Type="String"></Data> | ||
4172 | 493 | </Cell> | ||
4173 | 494 | <Cell ss:StyleID="ssBorderTop"> | ||
4174 | 495 | <Data ss:Type="String"></Data> | ||
4175 | 496 | </Cell> | ||
4176 | 497 | <Cell ss:StyleID="ssBorderTop"> | ||
4177 | 498 | <Data ss:Type="String"></Data> | ||
4178 | 499 | </Cell> | ||
4179 | 500 | </Row> | ||
4180 | 501 | </Table> | ||
4181 | 502 | <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"> | ||
4182 | 503 | <FitToPage/> | ||
4183 | 504 | <PageSetup> | ||
4184 | 505 | <Layout x:Orientation="Landscape"/> | ||
4185 | 506 | <Header x:Data="&C&"Arial,Bold"&14Employee Balance"/> | ||
4186 | 507 | <Footer x:Data="Page &P of &N"/> | ||
4187 | 508 | </PageSetup> | ||
4188 | 509 | <Print> | ||
4189 | 510 | <ValidPrinterInfo/> | ||
4190 | 511 | <PaperSizeIndex>9</PaperSizeIndex> | ||
4191 | 512 | <HorizontalResolution>600</HorizontalResolution> | ||
4192 | 513 | <VerticalResolution>600</VerticalResolution> | ||
4193 | 514 | </Print> | ||
4194 | 515 | <Selected/> | ||
4195 | 516 | <Panes> | ||
4196 | 517 | <Pane> | ||
4197 | 518 | <Number>3</Number> | ||
4198 | 519 | <ActiveRow>17</ActiveRow> | ||
4199 | 520 | </Pane> | ||
4200 | 521 | </Panes> | ||
4201 | 522 | <ProtectObjects>False</ProtectObjects> | ||
4202 | 523 | <ProtectScenarios>False</ProtectScenarios> | ||
4203 | 524 | </WorksheetOptions> | ||
4204 | 525 | </Worksheet> | ||
4205 | 526 | % endfor | ||
4206 | 527 | ## endfor Worksheet | ||
4207 | 528 | % endif | ||
4208 | 529 | ## endif if not entries | ||
4209 | 530 | </Workbook> | ||
4210 | 0 | 531 | ||
4211 | === modified file 'bin/addons/finance/report/account_report_name.py' | |||
4212 | --- bin/addons/finance/report/account_report_name.py 2014-03-14 15:47:48 +0000 | |||
4213 | +++ bin/addons/finance/report/account_report_name.py 2022-06-01 15:15:45 +0000 | |||
4214 | @@ -50,4 +50,28 @@ | |||
4215 | 50 | return update_name(self, cr, uid, _('Partner Ledger'), ret, context) | 50 | return update_name(self, cr, uid, _('Partner Ledger'), ret, context) |
4216 | 51 | 51 | ||
4217 | 52 | account_partner_ledger() | 52 | account_partner_ledger() |
4218 | 53 | |||
4219 | 54 | |||
4220 | 55 | class account_employee_balance(osv.osv_memory): | ||
4221 | 56 | _name = 'account.employee.balance' | ||
4222 | 57 | _inherit = 'account.employee.balance' | ||
4223 | 58 | |||
4224 | 59 | def _print_report(self, cr, uid, ids, data, context=None): | ||
4225 | 60 | ret = super(account_employee_balance, self)._print_report(cr, uid, ids, data, context) | ||
4226 | 61 | return update_name(self, cr, uid, _('Employee Balance'), ret, context) | ||
4227 | 62 | |||
4228 | 63 | |||
4229 | 64 | account_employee_balance() | ||
4230 | 65 | |||
4231 | 66 | |||
4232 | 67 | class account_employee_ledger(osv.osv_memory): | ||
4233 | 68 | _name = 'account.employee.ledger' | ||
4234 | 69 | _inherit = 'account.employee.ledger' | ||
4235 | 70 | |||
4236 | 71 | def _print_report(self, cr, uid, ids, data, context=None): | ||
4237 | 72 | ret = super(account_employee_ledger, self)._print_report(cr, uid, ids, data, context) | ||
4238 | 73 | return update_name(self, cr, uid, _('Employee Ledger'), ret, context) | ||
4239 | 74 | |||
4240 | 75 | |||
4241 | 76 | account_employee_ledger() | ||
4242 | 53 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 77 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4243 | 54 | 78 | ||
4244 | === modified file 'bin/addons/finance/wizard/__init__.py' | |||
4245 | --- bin/addons/finance/wizard/__init__.py 2020-12-14 16:46:05 +0000 | |||
4246 | +++ bin/addons/finance/wizard/__init__.py 2022-06-01 15:15:45 +0000 | |||
4247 | @@ -1,2 +1,3 @@ | |||
4248 | 1 | import account_report_partner_balance_tree # uf-1715 | 1 | import account_report_partner_balance_tree # uf-1715 |
4249 | 2 | import fo_follow_up_finance_wizard | 2 | import fo_follow_up_finance_wizard |
4250 | 3 | import account_report_employee_balance_tree # US-6392 | ||
4251 | 3 | 4 | ||
4252 | === added file 'bin/addons/finance/wizard/account_report_employee_balance_tree.py' | |||
4253 | --- bin/addons/finance/wizard/account_report_employee_balance_tree.py 1970-01-01 00:00:00 +0000 | |||
4254 | +++ bin/addons/finance/wizard/account_report_employee_balance_tree.py 2022-06-01 15:15:45 +0000 | |||
4255 | @@ -0,0 +1,553 @@ | |||
4256 | 1 | # -*- coding: utf-8 -*- | ||
4257 | 2 | ############################################################################## | ||
4258 | 3 | # | ||
4259 | 4 | # OpenERP, Open Source Management Solution | ||
4260 | 5 | # Copyright (C) 2022 TeMPO Consulting, MSF | ||
4261 | 6 | # | ||
4262 | 7 | # This program is free software: you can redistribute it and/or modify | ||
4263 | 8 | # it under the terms of the GNU Affero General Public License as | ||
4264 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
4265 | 10 | # License, or (at your option) any later version. | ||
4266 | 11 | # | ||
4267 | 12 | # This program is distributed in the hope that it will be useful, | ||
4268 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
4269 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
4270 | 15 | # GNU Affero General Public License for more details. | ||
4271 | 16 | # | ||
4272 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
4273 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4274 | 19 | # | ||
4275 | 20 | ############################################################################## | ||
4276 | 21 | |||
4277 | 22 | from osv import fields, osv | ||
4278 | 23 | from tools.translate import _ | ||
4279 | 24 | import decimal_precision as dp | ||
4280 | 25 | import datetime | ||
4281 | 26 | from datetime import timedelta | ||
4282 | 27 | |||
4283 | 28 | |||
4284 | 29 | class account_employee_balance_tree(osv.osv): | ||
4285 | 30 | _name = 'account.employee.balance.tree' | ||
4286 | 31 | _description = 'Print Account Employee Balance View' | ||
4287 | 32 | _columns = { | ||
4288 | 33 | 'uid': fields.many2one('res.users', 'Uid', invisible=True), | ||
4289 | 34 | 'build_ts': fields.datetime('Build timestamp', invisible=True), | ||
4290 | 35 | 'account_type': fields.selection([ | ||
4291 | 36 | ('payable', 'Payable'), | ||
4292 | 37 | ('receivable', 'Receivable') | ||
4293 | 38 | ], | ||
4294 | 39 | 'Account type'), # not used since US-3873 | ||
4295 | 40 | 'employee_id': fields.many2one('hr.employee', 'Employee', invisible=True), | ||
4296 | 41 | 'name': fields.char('Employee', size=168), # employee name | ||
4297 | 42 | 'employee_identification_id': fields.char('Employee Identification number', size=64 ), | ||
4298 | 43 | 'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')), | ||
4299 | 44 | 'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')), | ||
4300 | 45 | 'balance': fields.float('Balance', digits_compute=dp.get_precision('Account')), | ||
4301 | 46 | 'ib_debit': fields.float('Initial Balance Debit', digits_compute=dp.get_precision('Account')), # not used since US-3873 | ||
4302 | 47 | 'ib_credit': fields.float('Initial Balance Credit', digits_compute=dp.get_precision('Account')), # not used since US-3873 | ||
4303 | 48 | 'ib_balance': fields.float('IB Balance', digits_compute=dp.get_precision('Account')), # not used since US-3873 | ||
4304 | 49 | } | ||
4305 | 50 | |||
4306 | 51 | _order = "name, employee_id" | ||
4307 | 52 | |||
4308 | 53 | def __init__(self, pool, cr): | ||
4309 | 54 | super(account_employee_balance_tree, self).__init__(pool, cr) | ||
4310 | 55 | self.total_debit_credit_balance = {} | ||
4311 | 56 | self.move_line_ids = {} | ||
4312 | 57 | |||
4313 | 58 | def _execute_query_employees(self, cr, uid, data): | ||
4314 | 59 | """ | ||
4315 | 60 | Returns a list of dicts, each containing data for one employee | ||
4316 | 61 | """ | ||
4317 | 62 | obj_move = self.pool.get('account.move.line') | ||
4318 | 63 | used_context = data['form'].get('used_context', {}) | ||
4319 | 64 | |||
4320 | 65 | result_selection = data['form'].get('result_selection', '') | ||
4321 | 66 | if (result_selection == 'customer'): | ||
4322 | 67 | account_type = "('receivable')" | ||
4323 | 68 | elif (result_selection == 'supplier'): | ||
4324 | 69 | account_type = "('payable')" | ||
4325 | 70 | else: | ||
4326 | 71 | account_type = "('payable', 'receivable')" | ||
4327 | 72 | |||
4328 | 73 | move_state = "('draft','posted')" | ||
4329 | 74 | if data['form'].get('target_move', 'all') == 'posted': | ||
4330 | 75 | move_state = "('posted')" | ||
4331 | 76 | |||
4332 | 77 | fiscalyear_id = data['form'].get('fiscalyear_id', False) | ||
4333 | 78 | if not fiscalyear_id: | ||
4334 | 79 | # by default all FY taken into account | ||
4335 | 80 | used_context.update({'all_fiscalyear': True}) | ||
4336 | 81 | |||
4337 | 82 | where = obj_move._query_get(cr, uid, obj='l', context=used_context) or '' | ||
4338 | 83 | |||
4339 | 84 | # reconciliation filter | ||
4340 | 85 | reconcile_filter = data['form'].get('reconciled', '') | ||
4341 | 86 | if reconcile_filter == 'yes': | ||
4342 | 87 | self.RECONCILE_REQUEST = "AND l.reconcile_id IS NOT NULL" | ||
4343 | 88 | elif reconcile_filter == 'no': | ||
4344 | 89 | self.RECONCILE_REQUEST = "AND l.reconcile_id IS NULL AND ac.reconcile='t'" # reconcilable entries not reconciled | ||
4345 | 90 | else: # 'empty' | ||
4346 | 91 | self.RECONCILE_REQUEST = "" | ||
4347 | 92 | |||
4348 | 93 | # proprietary instances filter | ||
4349 | 94 | self.INSTANCE_REQUEST = '' | ||
4350 | 95 | instance_ids = data['form'].get('instance_ids', False) | ||
4351 | 96 | if instance_ids: | ||
4352 | 97 | self.INSTANCE_REQUEST = " AND l.instance_id in(%s)" % (",".join(map(str, instance_ids))) | ||
4353 | 98 | |||
4354 | 99 | self.EMPLOYEE_PAY_METHOD = '' | ||
4355 | 100 | self.EMPLOYEE_REQUEST = ' AND l.employee_id IS NOT NULL' | ||
4356 | 101 | if data['form'].get('employee_ids', False): # some employees are specifically selected | ||
4357 | 102 | employee_ids = data['form']['employee_ids'] | ||
4358 | 103 | if len(employee_ids) == 1: | ||
4359 | 104 | self.EMPLOYEE_REQUEST = ' AND p.id = %s' % employee_ids[0] | ||
4360 | 105 | else: | ||
4361 | 106 | self.EMPLOYEE_REQUEST = ' AND p.id IN %s' % (tuple(employee_ids),) | ||
4362 | 107 | else: # if there is not specifically selected employees | ||
4363 | 108 | if data['form'].get('only_active_employees'): # check if we should include only active employees | ||
4364 | 109 | self.EMPLOYEE_REQUEST = " AND res.active = 't'" | ||
4365 | 110 | # check if we should include only a selected type of employees | ||
4366 | 111 | emp_type = data['form'].get('employee_type') | ||
4367 | 112 | if emp_type != '': | ||
4368 | 113 | self.EMPLOYEE_REQUEST += " AND p.employee_type = '%s'" % emp_type.encode("utf-8") | ||
4369 | 114 | # check if we should include only employees using a selected method of payment | ||
4370 | 115 | pay_method = data['form'].get('payment_method') | ||
4371 | 116 | if pay_method != 'blank': | ||
4372 | 117 | self.EMPLOYEE_REQUEST += " AND pay.name = '%s'" % pay_method | ||
4373 | 118 | # do join with payment_method only when local staff is selected because exp staff don't always have payment method registered | ||
4374 | 119 | if emp_type == 'local': | ||
4375 | 120 | self.EMPLOYEE_PAY_METHOD = " JOIN hr_payment_method pay ON (p.payment_method_id = pay.id)" | ||
4376 | 121 | |||
4377 | 122 | |||
4378 | 123 | self.ACCOUNT_REQUEST = '' | ||
4379 | 124 | if data['form'].get('account_ids', False): # some accounts are specifically selected | ||
4380 | 125 | self.ACCOUNT_REQUEST = " AND ac.id IN (%s)" % (",".join(map(str, data['form']['account_ids']))) | ||
4381 | 126 | |||
4382 | 127 | where = where and 'AND %s' % where or '' | ||
4383 | 128 | query = """SELECT p.id as employee_id, p.identification_id as employee_identification_id, p.name_resource as employee_name, | ||
4384 | 129 | COALESCE(sum(debit),0) AS debit, COALESCE(sum(credit), 0) AS credit, | ||
4385 | 130 | CASE WHEN sum(debit) > sum(credit) THEN sum(debit) - sum(credit) ELSE 0 END AS sdebit, | ||
4386 | 131 | CASE WHEN sum(debit) < sum(credit) THEN sum(credit) - sum(debit) ELSE 0 END AS scredit | ||
4387 | 132 | FROM account_move_line l INNER JOIN hr_employee p ON (l.employee_id=p.id) | ||
4388 | 133 | INNER JOIN resource_resource res ON p.resource_id = res.id | ||
4389 | 134 | JOIN account_account ac ON (l.account_id = ac.id) | ||
4390 | 135 | JOIN account_move am ON (am.id = l.move_id) | ||
4391 | 136 | %s | ||
4392 | 137 | WHERE ac.type IN %s | ||
4393 | 138 | AND am.state IN %s | ||
4394 | 139 | %s %s %s %s %s | ||
4395 | 140 | GROUP BY p.id, p.identification_id, p.name_resource | ||
4396 | 141 | ORDER BY p.name_resource;""" % (self.EMPLOYEE_PAY_METHOD, account_type, move_state, # not_a_user_entry | ||
4397 | 142 | where, self.INSTANCE_REQUEST, self.EMPLOYEE_REQUEST, self.ACCOUNT_REQUEST, | ||
4398 | 143 | self.RECONCILE_REQUEST) | ||
4399 | 144 | cr.execute(query) | ||
4400 | 145 | res = cr.dictfetchall() | ||
4401 | 146 | |||
4402 | 147 | if data['form'].get('display_employee', '') == 'non-zero_balance': | ||
4403 | 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 | ||
4404 | 149 | else: # with_movements or all | ||
4405 | 150 | res2 = [r for r in res] | ||
4406 | 151 | return res2 | ||
4407 | 152 | |||
4408 | 153 | def _execute_query_selected_employee_move_line_ids(self, cr, uid, employee_id, data): | ||
4409 | 154 | # if this method is re-called with the same arguments don't recompute the result | ||
4410 | 155 | if not self.move_line_ids or employee_id != self.move_line_ids['employee_id'] or data != self.move_line_ids['data']: | ||
4411 | 156 | obj_move = self.pool.get('account.move.line') | ||
4412 | 157 | where = obj_move._query_get(cr, uid, obj='l', context=data['form'].get('used_context', {})) or '' | ||
4413 | 158 | |||
4414 | 159 | result_selection = data['form'].get('result_selection', '') | ||
4415 | 160 | if result_selection == 'customer': | ||
4416 | 161 | account_type = "('receivable')" | ||
4417 | 162 | elif result_selection == 'supplier': | ||
4418 | 163 | account_type = "('payable')" | ||
4419 | 164 | else: | ||
4420 | 165 | account_type = "('payable', 'receivable')" | ||
4421 | 166 | |||
4422 | 167 | move_state = "('draft','posted')" | ||
4423 | 168 | if data['form'].get('target_move', 'all') == 'posted': | ||
4424 | 169 | move_state = "('posted')" | ||
4425 | 170 | |||
4426 | 171 | query = "SELECT l.id FROM account_move_line l" \ | ||
4427 | 172 | " JOIN account_account ac ON (l.account_id = ac.id)" \ | ||
4428 | 173 | " JOIN account_move am ON (am.id = l.move_id) WHERE " | ||
4429 | 174 | if employee_id: | ||
4430 | 175 | query += "l.employee_id = " + str(employee_id) + "" \ | ||
4431 | 176 | " AND ac.type IN " + account_type + "" \ | ||
4432 | 177 | " AND am.state IN " + move_state + "" | ||
4433 | 178 | else: | ||
4434 | 179 | query += "ac.type IN " + account_type + "" \ | ||
4435 | 180 | " AND am.state IN " + move_state + "" | ||
4436 | 181 | |||
4437 | 182 | reconcile_filter = data['form'].get('reconciled', '') | ||
4438 | 183 | if reconcile_filter == 'yes': | ||
4439 | 184 | query += " AND l.reconcile_id IS NOT NULL" | ||
4440 | 185 | elif reconcile_filter == 'no': | ||
4441 | 186 | query += " AND l.reconcile_id IS NULL AND ac.reconcile='t'" # reconcilable entries not reconciled | ||
4442 | 187 | |||
4443 | 188 | if data['form'].get('instance_ids', False): | ||
4444 | 189 | query += " AND l.instance_id in(%s)" % (",".join(map(str, data['form']['instance_ids']))) | ||
4445 | 190 | if data['form'].get('account_ids', False): # some accounts are specifically selected | ||
4446 | 191 | query += " AND ac.id IN (%s)" % (",".join(map(str, data['form']['account_ids']))) | ||
4447 | 192 | if where: | ||
4448 | 193 | query += " AND " + where + "" | ||
4449 | 194 | |||
4450 | 195 | cr.execute(query) | ||
4451 | 196 | res = cr.fetchall() | ||
4452 | 197 | if res: | ||
4453 | 198 | res2 = [] | ||
4454 | 199 | for r in res: | ||
4455 | 200 | res2.append(r[0]) | ||
4456 | 201 | self.move_line_ids['res'] = res2 | ||
4457 | 202 | else: | ||
4458 | 203 | self.move_line_ids['res'] = False | ||
4459 | 204 | self.move_line_ids['employee_id'] = employee_id | ||
4460 | 205 | self.move_line_ids['data'] = data | ||
4461 | 206 | return self.move_line_ids['res'] | ||
4462 | 207 | |||
4463 | 208 | def _delete_previous_data(self, cr, uid, context=None): | ||
4464 | 209 | """ delete older user request than 15 days""" | ||
4465 | 210 | dt = datetime.datetime.now() - timedelta(days=15) | ||
4466 | 211 | dt_orm = dt.strftime(self.pool.get('date.tools').get_db_datetime_format(cr, uid, context=context)) | ||
4467 | 212 | domain = [ | ||
4468 | 213 | ('uid', '=', uid), | ||
4469 | 214 | ('build_ts', '<', dt_orm), | ||
4470 | 215 | ] | ||
4471 | 216 | ids = self.search(cr, uid, domain, context=context) | ||
4472 | 217 | if ids: | ||
4473 | 218 | if isinstance(ids, (int, long)): | ||
4474 | 219 | ids = [ids] | ||
4475 | 220 | self.unlink(cr, uid, ids, context=context) | ||
4476 | 221 | |||
4477 | 222 | def build_data(self, cr, uid, data, context=None): | ||
4478 | 223 | """ | ||
4479 | 224 | data | ||
4480 | 225 | {'model': 'ir.ui.menu', 'ids': [494], 'build_ts': build_timestamp, | ||
4481 | 226 | 'form': { | ||
4482 | 227 | 'display_employee': 'non-zero_balance', 'chart_account_id': 1, | ||
4483 | 228 | 'result_selection': 'customer', 'date_from': False, | ||
4484 | 229 | 'period_to': False, | ||
4485 | 230 | 'journal_ids': [16, 9, 10, 11, 12, 13, 14, 6, 7, 17, 18, 20, 15, 5, 1, 2, 3, 4, 8, 19], | ||
4486 | 231 | 'used_context': { | ||
4487 | 232 | 'chart_account_id': 1, | ||
4488 | 233 | 'journal_ids': [16, 9, 10, 11, 12, 13, 14, 6, 7, 17, 18, 20, 15, 5, 1, 2, 3, 4, 8, 19], | ||
4489 | 234 | 'fiscalyear': 1}, | ||
4490 | 235 | 'filter': 'filter_no', 'period_from': False, | ||
4491 | 236 | 'fiscalyear_id': 1, 'periods': [], 'date_to': False, 'id': 1, 'target_move': 'posted' | ||
4492 | 237 | } | ||
4493 | 238 | } | ||
4494 | 239 | """ | ||
4495 | 240 | if context is None: | ||
4496 | 241 | context = {} | ||
4497 | 242 | context['data'] = data | ||
4498 | 243 | self._delete_previous_data(cr, uid, context=context) | ||
4499 | 244 | |||
4500 | 245 | res = self._execute_query_employees(cr, uid, data) | ||
4501 | 246 | |||
4502 | 247 | p_seen = {} # store every employee handled | ||
4503 | 248 | for r in res: | ||
4504 | 249 | debit = r['debit'] | ||
4505 | 250 | credit = r['credit'] | ||
4506 | 251 | if r['employee_id'] not in p_seen: | ||
4507 | 252 | p_seen[r['employee_id']] = {} | ||
4508 | 253 | p_seen[r['employee_id']]['name'] = r['employee_name'] | ||
4509 | 254 | p_seen[r['employee_id']]['employee_identification_id'] = r['employee_identification_id'] | ||
4510 | 255 | vals = { | ||
4511 | 256 | 'uid': uid, | ||
4512 | 257 | 'build_ts': data['build_ts'], | ||
4513 | 258 | 'employee_id': r['employee_id'], | ||
4514 | 259 | 'name': r['employee_name'], | ||
4515 | 260 | 'employee_identification_id': r['employee_identification_id'], | ||
4516 | 261 | 'debit': debit, | ||
4517 | 262 | 'credit': credit, | ||
4518 | 263 | 'balance': debit - credit, | ||
4519 | 264 | } | ||
4520 | 265 | self.create(cr, uid, vals, context=context) | ||
4521 | 266 | |||
4522 | 267 | # if "Display Employees: All employees" has been selected, add the employees without movements | ||
4523 | 268 | # ONLY IF NO specific employee has been selected | ||
4524 | 269 | if data['form'].get('display_employee', '') == 'all' and not data['form'].get('employee_ids', False): | ||
4525 | 270 | # create entries at zero for employees where no result was found | ||
4526 | 271 | active_selection = data['form'].get('only_active_employees') and ('t',) or ('t', 'f') | ||
4527 | 272 | other_employees_sql_end = "" | ||
4528 | 273 | other_employees_sql_end_params = [] | ||
4529 | 274 | if p_seen: | ||
4530 | 275 | # exclude employees already found if any | ||
4531 | 276 | other_employees_sql_end = " AND emp.id NOT IN %s " | ||
4532 | 277 | other_employees_sql_end_params.append(tuple(p_seen.keys())) | ||
4533 | 278 | other_employees_sql = """ | ||
4534 | 279 | SELECT emp.id , emp.identification_id, emp.name_resource | ||
4535 | 280 | FROM hr_employee emp | ||
4536 | 281 | INNER JOIN resource_resource res ON emp.resource_id = res.id | ||
4537 | 282 | WHERE res.active IN %s """ + other_employees_sql_end + """ ; | ||
4538 | 283 | """ | ||
4539 | 284 | other_employees_params = (active_selection,) + tuple(other_employees_sql_end_params) | ||
4540 | 285 | cr.execute(other_employees_sql, other_employees_params) # not_a_user_entry | ||
4541 | 286 | other_employees = cr.dictfetchall() | ||
4542 | 287 | for employee in other_employees: | ||
4543 | 288 | vals = { | ||
4544 | 289 | 'uid': uid, | ||
4545 | 290 | 'build_ts': data['build_ts'], | ||
4546 | 291 | 'employee_id': employee['id'], | ||
4547 | 292 | 'name': employee['name_resource'], | ||
4548 | 293 | 'employee_identification_id': employee['identification_id'] or '', | ||
4549 | 294 | 'debit': 0.0, | ||
4550 | 295 | 'credit': 0.0, | ||
4551 | 296 | 'balance': 0.0, | ||
4552 | 297 | } | ||
4553 | 298 | self.create(cr, uid, vals, context=context) | ||
4554 | 299 | |||
4555 | 300 | def open_journal_items(self, cr, uid, ids, context=None): | ||
4556 | 301 | # get related employee | ||
4557 | 302 | res = {} | ||
4558 | 303 | if context is None: | ||
4559 | 304 | context = {} | ||
4560 | 305 | if ids: | ||
4561 | 306 | if isinstance(ids, (int, long)): | ||
4562 | 307 | ids = [ids] | ||
4563 | 308 | r = self.read(cr, uid, ids, ['employee_id'], context=context) | ||
4564 | 309 | if r and r[0] and r[0]['employee_id']: | ||
4565 | 310 | if context and 'data' in context and 'form' in context['data']: | ||
4566 | 311 | move_line_ids = self._execute_query_selected_employee_move_line_ids( | ||
4567 | 312 | cr, uid, | ||
4568 | 313 | r[0]['employee_id'][0], | ||
4569 | 314 | context['data']) | ||
4570 | 315 | if move_line_ids: | ||
4571 | 316 | new_context = {} | ||
4572 | 317 | if context: | ||
4573 | 318 | ctx_key_2copy = ('lang', 'tz', 'department_id', 'client', 'name') | ||
4574 | 319 | for k in ctx_key_2copy: | ||
4575 | 320 | if k in context: | ||
4576 | 321 | new_context[k] = context[k] | ||
4577 | 322 | view_id = self.pool.get('ir.model.data').get_object_reference( | ||
4578 | 323 | cr, uid, 'finance', | ||
4579 | 324 | 'view_account_employee_balance_tree_move_line_tree')[1] | ||
4580 | 325 | res = { | ||
4581 | 326 | 'name': 'Journal Items', | ||
4582 | 327 | 'type': 'ir.actions.act_window', | ||
4583 | 328 | 'res_model': 'account.move.line', | ||
4584 | 329 | 'view_mode': 'tree,form', | ||
4585 | 330 | 'view_type': 'form', | ||
4586 | 331 | 'domain': [('id', 'in', tuple(move_line_ids))], | ||
4587 | 332 | 'context': new_context, | ||
4588 | 333 | } | ||
4589 | 334 | if view_id: | ||
4590 | 335 | res['view_id'] = [view_id] | ||
4591 | 336 | if not res: | ||
4592 | 337 | raise osv.except_osv(_('Warning !'), _('No Journal Items to show.')) | ||
4593 | 338 | return res | ||
4594 | 339 | |||
4595 | 340 | def get_employee_data(self, cr, uid, data, context=None): | ||
4596 | 341 | """ | ||
4597 | 342 | Gets the "account_employee_balance_trees" which have just been created | ||
4598 | 343 | """ | ||
4599 | 344 | domain = [ | ||
4600 | 345 | ('uid', '=', uid), | ||
4601 | 346 | ('build_ts', '=', data['build_ts']), | ||
4602 | 347 | ] | ||
4603 | 348 | ids = self.search(cr, uid, domain, context=context, order='name, id') | ||
4604 | 349 | if ids: | ||
4605 | 350 | if isinstance(ids, (int, long)): | ||
4606 | 351 | ids = [ids] | ||
4607 | 352 | return self.browse(cr, uid, ids, context=context) | ||
4608 | 353 | return [] | ||
4609 | 354 | |||
4610 | 355 | def get_employee_account_move_lines_data(self, cr, uid, employee_id, data, context=None): | ||
4611 | 356 | ids = self._execute_query_selected_employee_move_line_ids(cr, uid, employee_id, data) | ||
4612 | 357 | if ids: | ||
4613 | 358 | if isinstance(ids, (int, long)): | ||
4614 | 359 | ids = [ids] | ||
4615 | 360 | sql = """SELECT a.code as account, SUM(aml.debit) as deb, SUM(aml.credit) as cred, SUM(debit) - SUM(credit) as total | ||
4616 | 361 | FROM account_move_line as aml, account_account as a | ||
4617 | 362 | WHERE aml.id in %s | ||
4618 | 363 | AND aml.account_id = a.id | ||
4619 | 364 | GROUP BY a.code""" | ||
4620 | 365 | cr.execute(sql, (tuple(ids), )) | ||
4621 | 366 | res = cr.dictfetchall() | ||
4622 | 367 | return res | ||
4623 | 368 | return [] | ||
4624 | 369 | |||
4625 | 370 | def get_lines_per_currency(self, cr, uid, employee_id, data, account_code): | ||
4626 | 371 | """ | ||
4627 | 372 | Returns a list of dicts, each containing the subtotal per currency for the given employee and account | ||
4628 | 373 | """ | ||
4629 | 374 | res = [] | ||
4630 | 375 | if employee_id and data and account_code: | ||
4631 | 376 | # the subtotal lines for the selected employee must be limited to the ids corresponding to | ||
4632 | 377 | # the criteria selected in the wizard | ||
4633 | 378 | ids = self._execute_query_selected_employee_move_line_ids(cr, uid, employee_id, data) | ||
4634 | 379 | if ids: | ||
4635 | 380 | sql = """SELECT c.name as currency_booking, | ||
4636 | 381 | SUM(aml.debit_currency) as debit_booking, SUM(aml.credit_currency) as credit_booking, | ||
4637 | 382 | SUM(debit_currency) - SUM(credit_currency) as total_booking, | ||
4638 | 383 | SUM(aml.debit) - SUM(aml.credit) as total_functional | ||
4639 | 384 | FROM account_move_line AS aml | ||
4640 | 385 | INNER JOIN account_account AS a ON aml.account_id = a.id | ||
4641 | 386 | INNER JOIN res_currency AS c ON aml.currency_id = c.id | ||
4642 | 387 | WHERE aml.id in %s | ||
4643 | 388 | AND a.code = %s | ||
4644 | 389 | GROUP BY a.code, c.name | ||
4645 | 390 | ORDER BY c.name;""" | ||
4646 | 391 | cr.execute(sql, (tuple(ids), account_code)) | ||
4647 | 392 | res = cr.dictfetchall() | ||
4648 | 393 | return res | ||
4649 | 394 | |||
4650 | 395 | def get_employees_total_debit_credit_balance(self, cr, uid, data): | ||
4651 | 396 | """Compute all employees total debit/credit from self data | ||
4652 | 397 | return total_debit, total_credit (tuple) | ||
4653 | 398 | """ | ||
4654 | 399 | # recalculate the result only if the criteria have changed | ||
4655 | 400 | if not self.total_debit_credit_balance or data != self.total_debit_credit_balance['data']: | ||
4656 | 401 | query = """SELECT sum(debit) AS debit, sum(credit) AS credit, sum(balance) as balance | ||
4657 | 402 | FROM account_employee_balance_tree | ||
4658 | 403 | WHERE uid = %s | ||
4659 | 404 | AND build_ts = %s; | ||
4660 | 405 | """ | ||
4661 | 406 | cr.execute(query, (uid, data['build_ts'])) | ||
4662 | 407 | res = cr.dictfetchall() | ||
4663 | 408 | self.total_debit_credit_balance['data'] = data | ||
4664 | 409 | self.total_debit_credit_balance['res'] = res[0]['debit'], res[0]['credit'], res[0]['balance'] | ||
4665 | 410 | return self.total_debit_credit_balance['res'] | ||
4666 | 411 | |||
4667 | 412 | |||
4668 | 413 | account_employee_balance_tree() | ||
4669 | 414 | |||
4670 | 415 | |||
4671 | 416 | class wizard_account_employee_balance_tree(osv.osv_memory): | ||
4672 | 417 | """ | ||
4673 | 418 | This wizard will provide the employee balance report by periods, between any two dates. | ||
4674 | 419 | """ | ||
4675 | 420 | _inherit = 'account.common.employee.report' | ||
4676 | 421 | _name = 'wizard.account.employee.balance.tree' | ||
4677 | 422 | _description = 'Print Account Employee Balance View' | ||
4678 | 423 | |||
4679 | 424 | def get_payment_methods(self, cr, uid, context): | ||
4680 | 425 | return self.pool.get('account.employee.ledger').get_payment_methods(cr, uid, context) | ||
4681 | 426 | |||
4682 | 427 | def get_employee_type(self, cr, uid, context): | ||
4683 | 428 | return self.pool.get('account.employee.ledger').get_employee_type(cr, uid, context) | ||
4684 | 429 | |||
4685 | 430 | _columns = { | ||
4686 | 431 | 'display_employee': fields.selection([('all', 'All Employees'), | ||
4687 | 432 | ('with_movements', 'With movements'), | ||
4688 | 433 | ('non-zero_balance', 'With balance is not equal to 0')], | ||
4689 | 434 | string='Display Employees', required=True), | ||
4690 | 435 | 'instance_ids': fields.many2many('msf.instance', 'account_report_general_ledger_instance_rel', 'instance_id', | ||
4691 | 436 | 'argl_id', 'Proprietary Instances'), | ||
4692 | 437 | 'employee_ids': fields.many2many('hr.employee', 'account_employee_balance_employee_rel', 'wizard_id', | ||
4693 | 438 | 'employee_id', string='Employees', | ||
4694 | 439 | help='Display the report for specific employees only'), | ||
4695 | 440 | 'only_active_employees': fields.boolean('Only active employees', | ||
4696 | 441 | help='Display the report for active employees only'), | ||
4697 | 442 | 'account_ids': fields.many2many('account.account', 'account_employee_balance_account_rel', 'wizard_id', | ||
4698 | 443 | 'account_id', string='Accounts', | ||
4699 | 444 | help='Display the report for specific accounts only'), | ||
4700 | 445 | 'reconciled': fields.selection([ | ||
4701 | 446 | ('empty', ''), | ||
4702 | 447 | ('yes', 'Yes'), | ||
4703 | 448 | ('no', 'No'), | ||
4704 | 449 | ], string='Reconciled'), | ||
4705 | 450 | 'employee_type': fields.selection(get_employee_type, string='Employee Type', required=False), | ||
4706 | 451 | 'payment_method': fields.selection(get_payment_methods, string='Method of Payment', required=False), | ||
4707 | 452 | } | ||
4708 | 453 | |||
4709 | 454 | def _get_journals(self, cr, uid, context=None): | ||
4710 | 455 | """exclude extra-accounting journals from this report (IKD, ODX).""" | ||
4711 | 456 | domain = [('type', 'not in', ['inkind', 'extra'])] | ||
4712 | 457 | return self.pool.get('account.journal').search(cr, uid, domain, context=context) | ||
4713 | 458 | |||
4714 | 459 | _defaults = { | ||
4715 | 460 | 'display_employee': 'with_movements', | ||
4716 | 461 | 'result_selection': 'customer_supplier', | ||
4717 | 462 | 'account_domain': "[('type', 'in', ['payable', 'receivable'])]", | ||
4718 | 463 | 'journal_ids': _get_journals, | ||
4719 | 464 | 'only_active_employees': False, | ||
4720 | 465 | 'reconciled': 'empty', | ||
4721 | 466 | 'fiscalyear_id': False, | ||
4722 | 467 | 'employee_type': '', | ||
4723 | 468 | 'payment_method': 'blank', | ||
4724 | 469 | } | ||
4725 | 470 | |||
4726 | 471 | def _get_data(self, cr, uid, ids, context=None): | ||
4727 | 472 | if context is None: | ||
4728 | 473 | context = {} | ||
4729 | 474 | |||
4730 | 475 | data = {} | ||
4731 | 476 | data['keep_open'] = 1 | ||
4732 | 477 | data['ids'] = context.get('active_ids', []) | ||
4733 | 478 | data['model'] = context.get('active_model', 'ir.ui.menu') | ||
4734 | 479 | data['build_ts'] = datetime.datetime.now().strftime(self.pool.get('date.tools').get_db_datetime_format(cr, uid, context=context)) | ||
4735 | 480 | data['form'] = self.read(cr, uid, ids, ['date_from', 'date_to', 'fiscalyear_id', 'journal_ids', 'period_from', | ||
4736 | 481 | 'period_to', 'filter', 'chart_account_id', 'target_move', 'display_employee', | ||
4737 | 482 | 'instance_ids', 'employee_ids', 'employee_type', 'payment_method', | ||
4738 | 483 | 'only_active_employees', 'account_ids', 'reconciled'])[0] | ||
4739 | 484 | if not data['form']['employee_type']: | ||
4740 | 485 | data['form']['employee_type'] = '' | ||
4741 | 486 | if data['form']['journal_ids']: | ||
4742 | 487 | default_journals = self._get_journals(cr, uid, context=context) | ||
4743 | 488 | if default_journals: | ||
4744 | 489 | if len(default_journals) == len(data['form']['journal_ids']): | ||
4745 | 490 | data['form']['all_journals'] = True | ||
4746 | 491 | used_context = self._build_contexts(cr, uid, ids, data, context=context) | ||
4747 | 492 | data['form']['periods'] = used_context.get('periods', False) and used_context['periods'] or [] | ||
4748 | 493 | data['form']['used_context'] = used_context | ||
4749 | 494 | |||
4750 | 495 | data = self.pre_print_report(cr, uid, ids, data, context=context) | ||
4751 | 496 | return data | ||
4752 | 497 | |||
4753 | 498 | def show(self, cr, buid, ids, context=None): | ||
4754 | 499 | uid = hasattr(buid, 'realUid') and buid.realUid or buid | ||
4755 | 500 | data = self._get_data(cr, uid, ids, context=context) | ||
4756 | 501 | self.pool.get('account.employee.balance.tree').build_data(cr, uid, data, context=context) | ||
4757 | 502 | self._check_dates_fy_consistency(cr, uid, data, context) | ||
4758 | 503 | return { | ||
4759 | 504 | 'type': 'ir.actions.act_window', | ||
4760 | 505 | 'name': _('Employee Balance'), | ||
4761 | 506 | 'res_model': 'account.employee.balance.tree', | ||
4762 | 507 | 'view_type': 'form', | ||
4763 | 508 | 'view_mode': 'tree,form', | ||
4764 | 509 | 'keep_open': 1, | ||
4765 | 510 | 'ref': 'view_account_employee_balance_tree', | ||
4766 | 511 | 'domain': [ | ||
4767 | 512 | ('uid', '=', uid), | ||
4768 | 513 | ('build_ts', '=', data['build_ts']), | ||
4769 | 514 | ], | ||
4770 | 515 | 'context': context, | ||
4771 | 516 | } | ||
4772 | 517 | |||
4773 | 518 | def print_pdf(self, cr, buid, ids, context=None): | ||
4774 | 519 | if context is None: | ||
4775 | 520 | context = {} | ||
4776 | 521 | uid = hasattr(buid, 'realUid') and buid.realUid or buid | ||
4777 | 522 | data = self._get_data(cr, uid, ids, context=context) | ||
4778 | 523 | self._check_dates_fy_consistency(cr, uid, data, context) | ||
4779 | 524 | self.pool.get('account.employee.balance.tree').build_data(cr, uid, data, context=context) | ||
4780 | 525 | return { | ||
4781 | 526 | 'type': 'ir.actions.report.xml', | ||
4782 | 527 | 'report_name': 'account.employee.balance', | ||
4783 | 528 | 'datas': data, | ||
4784 | 529 | } | ||
4785 | 530 | |||
4786 | 531 | def print_xls(self, cr, buid, ids, context=None): | ||
4787 | 532 | if context is None: | ||
4788 | 533 | context = {} | ||
4789 | 534 | uid = hasattr(buid, 'realUid') and buid.realUid or buid | ||
4790 | 535 | data = self._get_data(cr, uid, ids, context=context) | ||
4791 | 536 | self._check_dates_fy_consistency(cr, uid, data, context) | ||
4792 | 537 | self.pool.get('account.employee.balance.tree').build_data(cr, uid, data, context=context) | ||
4793 | 538 | return { | ||
4794 | 539 | 'type': 'ir.actions.report.xml', | ||
4795 | 540 | 'report_name': 'account.employee.balance.tree_xls', | ||
4796 | 541 | 'datas': data, | ||
4797 | 542 | } | ||
4798 | 543 | |||
4799 | 544 | def remove_journals(self, cr, uid, ids, context=None): | ||
4800 | 545 | if ids: | ||
4801 | 546 | self.write(cr, uid, ids, {'journal_ids': [(6, 0, [])]}, | ||
4802 | 547 | context=context) | ||
4803 | 548 | return {} | ||
4804 | 549 | |||
4805 | 550 | |||
4806 | 551 | wizard_account_employee_balance_tree() | ||
4807 | 552 | |||
4808 | 553 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
4809 | 0 | 554 | ||
4810 | === added file 'bin/addons/finance/wizard/account_report_employee_balance_tree_view.xml' | |||
4811 | --- bin/addons/finance/wizard/account_report_employee_balance_tree_view.xml 1970-01-01 00:00:00 +0000 | |||
4812 | +++ bin/addons/finance/wizard/account_report_employee_balance_tree_view.xml 2022-06-01 15:15:45 +0000 | |||
4813 | @@ -0,0 +1,177 @@ | |||
4814 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
4815 | 2 | <openerp> | ||
4816 | 3 | <data> | ||
4817 | 4 | |||
4818 | 5 | <record model="ir.ui.view" id="view_account_employee_balance_search" > | ||
4819 | 6 | <field name="name">account.employee.balance.tree.search</field> | ||
4820 | 7 | <field name="model">account.employee.balance.tree</field> | ||
4821 | 8 | <field name="type">search</field> | ||
4822 | 9 | <field name="arch" type="xml"> | ||
4823 | 10 | <search string="Employee Balance Search"> | ||
4824 | 11 | <field name="employee_id" string="Employee" /> | ||
4825 | 12 | </search> | ||
4826 | 13 | </field> | ||
4827 | 14 | </record> | ||
4828 | 15 | |||
4829 | 16 | <record model="ir.ui.view" id="view_account_employee_balance_tree"> | ||
4830 | 17 | <field name="name">account.employee.balance.tree.view</field> | ||
4831 | 18 | <field name="model">account.employee.balance.tree</field> | ||
4832 | 19 | <field name="type">tree</field> | ||
4833 | 20 | <field name="priority" eval="300"/> | ||
4834 | 21 | <field name="arch" type="xml"> | ||
4835 | 22 | <tree string="Employee Balance View" | ||
4836 | 23 | editable="top" noteditable="1" | ||
4837 | 24 | hide_new_button="1" hide_delete_button="1"> | ||
4838 | 25 | <button | ||
4839 | 26 | name="open_journal_items" | ||
4840 | 27 | string="Open journal items" | ||
4841 | 28 | type="object" | ||
4842 | 29 | icon="terp-gtk-go-back-rtl" | ||
4843 | 30 | /> | ||
4844 | 31 | <field name="employee_id" invisible="1"/> | ||
4845 | 32 | <field name="name"/> | ||
4846 | 33 | <field name="debit" sum="Debit" /> | ||
4847 | 34 | <field name="credit" sum="Credit" /> | ||
4848 | 35 | <field name="balance" sum="Balance" /> | ||
4849 | 36 | </tree> | ||
4850 | 37 | </field> | ||
4851 | 38 | </record> | ||
4852 | 39 | |||
4853 | 40 | <!-- journal items from view_account_employee_balance_tree !--> | ||
4854 | 41 | <record model="ir.ui.view" id="view_account_employee_balance_tree_move_line_tree"> | ||
4855 | 42 | <field name="name">account.move.line.tree</field> | ||
4856 | 43 | <field name="model">account.move.line</field> | ||
4857 | 44 | <field name="type">tree</field> | ||
4858 | 45 | <field name="priority" eval="301"/> | ||
4859 | 46 | <field name="arch" type="xml"> | ||
4860 | 47 | <tree string="Account Entry Line" editable="bottom" noteditable="1" colors="red:state in ('draft');black:state in ('valid')" hide_new_button="1"> | ||
4861 | 48 | <field name="journal_id"/> | ||
4862 | 49 | <field name="move_id"/> | ||
4863 | 50 | <!-- | ||
4864 | 51 | <field name="name"/> | ||
4865 | 52 | <field name="ref"/> | ||
4866 | 53 | --> | ||
4867 | 54 | <field name="document_date"/> | ||
4868 | 55 | <field name="date"/> | ||
4869 | 56 | <field name="period_id" domain="[('state','=','draft')]"/> | ||
4870 | 57 | <field name="account_id"/> | ||
4871 | 58 | <field name="move_state" invisible="1"/> | ||
4872 | 59 | <field name="partner_id" invisible="1"/> | ||
4873 | 60 | <field name="employee_id" invisible="1"/> | ||
4874 | 61 | <field name="transfer_journal_id" invisible="1"/> | ||
4875 | 62 | <field name="partner_txt" invisible="1"/> | ||
4876 | 63 | <field name="partner_type"/> | ||
4877 | 64 | <field name="debit_currency" sum="Total Book. Debit"/> | ||
4878 | 65 | <field name="credit_currency" sum="Total Book. Credit"/> | ||
4879 | 66 | <field name="currency_id"/> | ||
4880 | 67 | <field name="debit" sum="Total Func. Debit"/> | ||
4881 | 68 | <field name="credit" sum="Total Func. Credit"/> | ||
4882 | 69 | <field name="output_amount_debit" invisible="1" /> | ||
4883 | 70 | <field name="output_amount_credit" invisible="1" /> | ||
4884 | 71 | <field name="functional_currency_id"/> | ||
4885 | 72 | <field name="reconcile_txt"/> | ||
4886 | 73 | <field name="state"/> | ||
4887 | 74 | </tree> | ||
4888 | 75 | </field> | ||
4889 | 76 | </record> | ||
4890 | 77 | |||
4891 | 78 | <record id="wizard_account_report_employee_balance_tree_view" model="ir.ui.view"> | ||
4892 | 79 | <field name="name">Employee Balance View</field> | ||
4893 | 80 | <field name="model">wizard.account.employee.balance.tree</field> | ||
4894 | 81 | <field name="type">form</field> | ||
4895 | 82 | <field name="inherit_id" ref="account.account_common_report_view" /> | ||
4896 | 83 | <field name="arch" type="xml"> | ||
4897 | 84 | <data> | ||
4898 | 85 | <xpath expr="/form/label[@string='']" position="replace"> | ||
4899 | 86 | <separator string="Employee Balance Tree" colspan="4"/> | ||
4900 | 87 | </xpath> | ||
4901 | 88 | <xpath expr="//field[@name='target_move']" position="after"> | ||
4902 | 89 | <field name="result_selection" on_change="onchange_result_selection(result_selection)"/> | ||
4903 | 90 | <field name="display_employee"/> | ||
4904 | 91 | <field name="reconciled"/> | ||
4905 | 92 | <field name="only_active_employees"/> | ||
4906 | 93 | <field name="employee_type" on_change="onchange_employee_type(employee_type)"/> | ||
4907 | 94 | <field name="payment_method" on_change="onchange_payment_method(payment_method)"/> | ||
4908 | 95 | <field name="instance_ids" domain="[('instance_to_display_ids','=',True)]"> | ||
4909 | 96 | <tree noteditable="1" editable="top" string="Proprietary Instances"> | ||
4910 | 97 | <field name="code" /> | ||
4911 | 98 | <field name="name" /> | ||
4912 | 99 | </tree> | ||
4913 | 100 | </field> | ||
4914 | 101 | <field name="employee_ids" > | ||
4915 | 102 | <tree noteditable="1"> | ||
4916 | 103 | <field name="name_resource"/> | ||
4917 | 104 | <field name="identification_id"/> | ||
4918 | 105 | <field name="employee_type"/> | ||
4919 | 106 | </tree> | ||
4920 | 107 | </field> | ||
4921 | 108 | <field name="account_domain" invisible="1"/> | ||
4922 | 109 | <field name="account_ids" domain="account_domain"> | ||
4923 | 110 | <tree noteditable="1"> | ||
4924 | 111 | <field name="code"/> | ||
4925 | 112 | <field name="name"/> | ||
4926 | 113 | </tree> | ||
4927 | 114 | </field> | ||
4928 | 115 | </xpath> | ||
4929 | 116 | <xpath expr="//field[@name='fiscalyear_id']" position="attributes"> | ||
4930 | 117 | <attribute name="on_change">onchange_fiscalyear(fiscalyear_id)</attribute> | ||
4931 | 118 | </xpath> | ||
4932 | 119 | <xpath expr="//field[@name='period_from']" position="attributes"> | ||
4933 | 120 | <attribute name="domain">[]</attribute> | ||
4934 | 121 | </xpath> | ||
4935 | 122 | <xpath expr="//field[@name='period_to']" position="attributes"> | ||
4936 | 123 | <attribute name="domain">[]</attribute> | ||
4937 | 124 | </xpath> | ||
4938 | 125 | |||
4939 | 126 | <xpath expr="//group[1]" position="replace"> | ||
4940 | 127 | <group col="4" colspan="4"> | ||
4941 | 128 | <button icon="gtk-cancel" special="cancel" string="Cancel" colspan="2"/> | ||
4942 | 129 | <button icon="terp-gtk-go-back-rtl" name="show" string="Balance View" type="object" colspan="2" default_focus="1" /> | ||
4943 | 130 | <button icon="gtk-print" name="print_pdf" string="Print PDF" type="object" colspan="2" /> | ||
4944 | 131 | <button icon="gtk-print" name="print_xls" string="Print Excel" type="object" colspan="2" /> | ||
4945 | 132 | </group> | ||
4946 | 133 | </xpath> | ||
4947 | 134 | |||
4948 | 135 | <xpath expr="//field[@name='journal_ids']" position="replace"> | ||
4949 | 136 | <group col="4" colspan="4"> | ||
4950 | 137 | <button name="remove_journals" string="Remove all journals" type="object" colspan="1" /> | ||
4951 | 138 | <label string="" colspan="3" /> | ||
4952 | 139 | <!-- exclude extra-accounting journals from this report (IKD, ODX). --> | ||
4953 | 140 | <field name="journal_ids" colspan="4" nolabel="1" noteditable="1" | ||
4954 | 141 | domain="[('type', 'not in', ['inkind', 'extra'])]"> | ||
4955 | 142 | <tree noteditable="1" editable="top" string="Account Journal" colors="red:is_active==False;black:is_active==True"> | ||
4956 | 143 | <field name="is_active" invisible="1" /> | ||
4957 | 144 | <field name="instance_id" /> | ||
4958 | 145 | <field name="code" /> | ||
4959 | 146 | <field name="name" /> | ||
4960 | 147 | <field name="type" /> | ||
4961 | 148 | </tree> | ||
4962 | 149 | </field> | ||
4963 | 150 | </group> | ||
4964 | 151 | </xpath> | ||
4965 | 152 | |||
4966 | 153 | </data> | ||
4967 | 154 | </field> | ||
4968 | 155 | </record> | ||
4969 | 156 | |||
4970 | 157 | <record id="action_account_employee_balance_tree" model="ir.actions.act_window"> | ||
4971 | 158 | <field name="name">Employee Balance View</field> | ||
4972 | 159 | <field name="res_model">wizard.account.employee.balance.tree</field> | ||
4973 | 160 | <field name="type">ir.actions.act_window</field> | ||
4974 | 161 | <field name="view_type">form</field> | ||
4975 | 162 | <field name="view_mode">form</field> | ||
4976 | 163 | <field name="view_id" ref="wizard_account_report_employee_balance_tree_view"/> | ||
4977 | 164 | <field name="context">{'record_id': active_id}</field> | ||
4978 | 165 | <field name="target">new</field> | ||
4979 | 166 | </record> | ||
4980 | 167 | |||
4981 | 168 | |||
4982 | 169 | <menuitem icon="STOCK_PRINT" | ||
4983 | 170 | name="Employee Balance" | ||
4984 | 171 | action="action_account_employee_balance_tree" | ||
4985 | 172 | id="menu_account_employee_balance_tree" | ||
4986 | 173 | parent="account.employee_menu" | ||
4987 | 174 | sequence="2000" /> | ||
4988 | 175 | |||
4989 | 176 | </data> | ||
4990 | 177 | </openerp> | ||
4991 | 0 | 178 | ||
4992 | === modified file 'bin/addons/msf_profile/i18n/fr_MF.po' | |||
4993 | --- bin/addons/msf_profile/i18n/fr_MF.po 2022-05-25 14:15:34 +0000 | |||
4994 | +++ bin/addons/msf_profile/i18n/fr_MF.po 2022-06-01 15:15:45 +0000 | |||
4995 | @@ -1938,6 +1938,9 @@ | |||
4996 | 1938 | #: report:account.third_party_ledger:0 | 1938 | #: report:account.third_party_ledger:0 |
4997 | 1939 | #: report:account.third_party_ledger_other:0 | 1939 | #: report:account.third_party_ledger_other:0 |
4998 | 1940 | #: report:addons/account/report/account_partner_ledger.mako:278 | 1940 | #: report:addons/account/report/account_partner_ledger.mako:278 |
4999 | 1941 | #: report:account.employee_ledger:0 | ||
5000 | 1942 | #: report:account.employee_ledger_other:0 |
The diff has been truncated for viewing.