Merge lp:~openerp-dev/openobject-addons/trunk-qwebreport-l10n_in-employee-salary-bymonth-rsi into lp:~openerp-dev/openobject-addons/trunk-qwebreport-l10n_in
- trunk-qwebreport-l10n_in-employee-salary-bymonth-rsi
- Merge into trunk-qwebreport-l10n_in
Proposed by
Rakesh Sindhav(OpenERP)
Status: | Merged |
---|---|
Merged at revision: | 9356 |
Proposed branch: | lp:~openerp-dev/openobject-addons/trunk-qwebreport-l10n_in-employee-salary-bymonth-rsi |
Merge into: | lp:~openerp-dev/openobject-addons/trunk-qwebreport-l10n_in |
Diff against target: |
484 lines (+76/-316) 6 files modified
l10n_in_hr_payroll/__openerp__.py (+1/-0) l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml (+7/-7) l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py (+11/-7) l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml (+0/-293) l10n_in_hr_payroll/views/report_hrsalarybymonth.xml (+52/-0) l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py (+5/-9) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/trunk-qwebreport-l10n_in-employee-salary-bymonth-rsi |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP R&D Team | Pending | ||
Review via email: mp+216577@code.launchpad.net |
Commit message
Description of the change
Hello Sir,
In the l10n_in_hr_payroll module, i convert the hr_salary_
Thanks & Regard,
rsi
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 'l10n_in_hr_payroll/__openerp__.py' |
2 | --- l10n_in_hr_payroll/__openerp__.py 2013-10-27 12:31:04 +0000 |
3 | +++ l10n_in_hr_payroll/__openerp__.py 2014-04-23 06:59:38 +0000 |
4 | @@ -49,6 +49,7 @@ |
5 | 'security/ir.model.access.csv', |
6 | 'l10n_in_hr_payroll_report.xml', |
7 | 'l10n_in_hr_payroll_sequence.xml', |
8 | + 'views/report_hrsalarybymonth.xml', |
9 | 'wizard/hr_salary_employee_bymonth_view.xml', |
10 | 'wizard/hr_yearly_salary_detail_view.xml', |
11 | 'report/payment_advice_report_view.xml', |
12 | |
13 | === modified file 'l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml' |
14 | --- l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml 2012-08-08 07:04:14 +0000 |
15 | +++ l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml 2014-04-23 06:59:38 +0000 |
16 | @@ -18,13 +18,13 @@ |
17 | rml="l10n_in_hr_payroll/report/report_payroll_advice.rml" |
18 | string="Print Advice" /> |
19 | |
20 | - <report |
21 | - auto="False" |
22 | - id="hr_salary_employee_bymonth" |
23 | - model="hr.salary.employee.month" |
24 | - name="salary.employee.bymonth" |
25 | - rml="l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml" |
26 | - string="Yearly Salary by Head" /> |
27 | + <report |
28 | + id="hr_salary_bymonth" |
29 | + string="Yearly Salary by Head" |
30 | + model="hr.salary.employee.month" |
31 | + report_type="qweb-pdf" |
32 | + file="l10n_in_hr_payroll.report_hrsalarybymonth" |
33 | + name="l10n_in_hr_payroll.report_hrsalarybymonth"/> |
34 | |
35 | <report |
36 | auto="False" |
37 | |
38 | === modified file 'l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py' |
39 | --- l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py 2012-12-06 14:56:32 +0000 |
40 | +++ l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py 2014-04-23 06:59:38 +0000 |
41 | @@ -21,7 +21,7 @@ |
42 | |
43 | import datetime |
44 | import time |
45 | - |
46 | +from openerp.osv import osv |
47 | from openerp.report import report_sxw |
48 | |
49 | class report_hr_salary_employee_bymonth(report_sxw.rml_parse): |
50 | @@ -64,8 +64,8 @@ |
51 | current_year = last_year |
52 | current_month = current_month + 1 |
53 | for c in range(0, (12-no_months)): |
54 | - mnth_name.append('None') |
55 | - self.mnths.append('None') |
56 | + mnth_name.append('') |
57 | + self.mnths.append('') |
58 | return [mnth_name] |
59 | |
60 | def get_salary(self, form, emp_id, emp_salary, total_mnths): |
61 | @@ -81,10 +81,10 @@ |
62 | sal = self.cr.fetchall() |
63 | salary = dict(sal) |
64 | total = 0.0 |
65 | - cnt = 1 |
66 | + cnt = 0 |
67 | |
68 | for month in self.mnths: |
69 | - if month <> 'None': |
70 | + if month <> '': |
71 | if len(month) != 7: |
72 | month = '0' + str(month) |
73 | if month in salary and salary[month]: |
74 | @@ -102,7 +102,7 @@ |
75 | def get_employee(self, form): |
76 | emp_salary = [] |
77 | salary_list = [] |
78 | - total_mnths=['Total', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
79 | + total_mnths=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
80 | emp_obj = self.pool.get('hr.employee') |
81 | emp_ids = form.get('employee_ids', []) |
82 | employees = emp_obj.browse(self.cr, self.uid, emp_ids, context=self.context) |
83 | @@ -128,6 +128,10 @@ |
84 | self.total += item[count] |
85 | return self.total |
86 | |
87 | -report_sxw.report_sxw('report.salary.employee.bymonth', 'hr.salary.employee.month', 'l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml', parser=report_hr_salary_employee_bymonth, header='internal') |
88 | +class employee_salary_bymonth(osv.AbstractModel): |
89 | + _name = 'report.l10n_in_hr_payroll.report_hrsalarybymonth' |
90 | + _inherit = 'report.abstract_report' |
91 | + _template = 'l10n_in_hr_payroll.report_hrsalarybymonth' |
92 | + _wrapped_report_class = report_hr_salary_employee_bymonth |
93 | |
94 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
95 | \ No newline at end of file |
96 | |
97 | === removed file 'l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml' |
98 | --- l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml 2012-10-03 07:14:21 +0000 |
99 | +++ l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml 1970-01-01 00:00:00 +0000 |
100 | @@ -1,293 +0,0 @@ |
101 | -<?xml version="1.0"?> |
102 | -<document filename="yearly salary report.pdf"> |
103 | - <template pageSize="(620.0,842.0)" title="Yearly Salary Report" author="OpenERP" allowSplitting="50"> |
104 | - <pageTemplate id="first"> |
105 | - <frame id="first" x1="28.0" y1="28.0" width="539" height="772"/> |
106 | - </pageTemplate> |
107 | - </template> |
108 | - <stylesheet> |
109 | - <blockTableStyle id="Standard_Outline"> |
110 | - <blockAlignment value="LEFT"/> |
111 | - <blockValign value="TOP"/> |
112 | - </blockTableStyle> |
113 | - <blockTableStyle id="Table1"> |
114 | - <blockAlignment value="LEFT"/> |
115 | - <blockValign value="TOP"/> |
116 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/> |
117 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
118 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> |
119 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
120 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> |
121 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
122 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/> |
123 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> |
124 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/> |
125 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> |
126 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/> |
127 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> |
128 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/> |
129 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/> |
130 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/> |
131 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/> |
132 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="8,0" stop="8,0"/> |
133 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/> |
134 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="9,0" stop="9,0"/> |
135 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="9,-1" stop="9,-1"/> |
136 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="10,0" stop="10,0"/> |
137 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="10,-1" stop="10,-1"/> |
138 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="11,0" stop="11,0"/> |
139 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="11,-1" stop="11,-1"/> |
140 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="12,0" stop="12,0"/> |
141 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="12,-1" stop="12,-1"/> |
142 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="13,0" stop="13,0"/> |
143 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="13,-1" stop="13,-1"/> |
144 | - </blockTableStyle> |
145 | - <blockTableStyle id="Table2"> |
146 | - <blockAlignment value="LEFT"/> |
147 | - <blockValign value="TOP"/> |
148 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/> |
149 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/> |
150 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/> |
151 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/> |
152 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/> |
153 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/> |
154 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/> |
155 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/> |
156 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/> |
157 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="9,-1" stop="9,-1"/> |
158 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="10,-1" stop="10,-1"/> |
159 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="11,-1" stop="11,-1"/> |
160 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="12,-1" stop="12,-1"/> |
161 | - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="13,-1" stop="13,-1"/> |
162 | - </blockTableStyle> |
163 | - <blockTableStyle id="Table6"> |
164 | - <blockAlignment value="LEFT"/> |
165 | - <blockValign value="TOP"/> |
166 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/> |
167 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> |
168 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> |
169 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/> |
170 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/> |
171 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/> |
172 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/> |
173 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/> |
174 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="8,0" stop="8,0"/> |
175 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="9,0" stop="9,0"/> |
176 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="10,0" stop="10,0"/> |
177 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="11,0" stop="11,0"/> |
178 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="12,0" stop="12,0"/> |
179 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="13,0" stop="13,0"/> |
180 | - </blockTableStyle> |
181 | - <initialize> |
182 | - <paraStyle name="all" alignment="justify"/> |
183 | - </initialize> |
184 | - <paraStyle name="P1" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
185 | - <paraStyle name="P2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
186 | - <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
187 | - <paraStyle name="P4" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
188 | - <paraStyle name="P5" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
189 | - <paraStyle name="P6" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
190 | - <paraStyle name="Standard" fontName="Helvetica"/> |
191 | - <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
192 | - <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
193 | - <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
194 | - <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
195 | - <paraStyle name="Index" fontName="Helvetica"/> |
196 | - <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
197 | - <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
198 | - <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
199 | - <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
200 | - <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
201 | - <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="7.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
202 | - <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="7.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
203 | - <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
204 | - <paraStyle name="Table Contents" fontName="Helvetica"/> |
205 | - <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/> |
206 | - <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="5.0" leading="5" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
207 | - <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="5.0" leading="2" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
208 | - <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="7.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
209 | - <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="5.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
210 | - <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> |
211 | - <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> |
212 | - <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="5.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
213 | - <images/> |
214 | - </stylesheet> |
215 | - <story> |
216 | - <para style="P1">Yearly Salary Details </para> |
217 | - <para style="P5">From <u>[[ formatLang(data['form']['start_date'], date=True) ]]</u> To <u>[[ formatLang(data['form']['end_date'], date=True) ]]</u> of <u>[[ (data['form']['category_id'][1]) ]]</u> Category</para> |
218 | - <para style="P6"> |
219 | - <font color="white"> </font> |
220 | - </para> |
221 | - <section> |
222 | - <para style="terp_default_1">[[ repeatIn(get_periods(data['form']),'m') ]]</para> |
223 | - <blockTable colWidths="55.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,57.0" style="Table1"> |
224 | - <tr> |
225 | - <td> |
226 | - <para style="terp_tblheader_Details">Name</para> |
227 | - </td> |
228 | - <td> |
229 | - <para style="terp_tblheader_Details_Right">[[ m[0] != 'None' and m[0] or '' ]]</para> |
230 | - </td> |
231 | - <td> |
232 | - <para style="terp_tblheader_Details_Right">[[ m[1] != 'None' and m[1] or '' ]]</para> |
233 | - </td> |
234 | - <td> |
235 | - <para style="terp_tblheader_Details_Right">[[ m[2] != 'None' and m[2] or '' ]]</para> |
236 | - </td> |
237 | - <td> |
238 | - <para style="terp_tblheader_Details_Right">[[ m[3] != 'None' and m[3] or '' ]]</para> |
239 | - </td> |
240 | - <td> |
241 | - <para style="terp_tblheader_Details_Right">[[ m[4] != 'None' and m[4] or '' ]]</para> |
242 | - </td> |
243 | - <td> |
244 | - <para style="terp_tblheader_Details_Right">[[ m[5] != 'None' and m[5] or '' ]]</para> |
245 | - </td> |
246 | - <td> |
247 | - <para style="terp_tblheader_Details_Right">[[ m[6] != 'None' and m[6] or '' ]]</para> |
248 | - </td> |
249 | - <td> |
250 | - <para style="terp_tblheader_Details_Right">[[ m[7] != 'None' and m[7] or '' ]]</para> |
251 | - </td> |
252 | - <td> |
253 | - <para style="terp_tblheader_Details_Right">[[ m[8] != 'None' and m[8] or '' ]]</para> |
254 | - </td> |
255 | - <td> |
256 | - <para style="terp_tblheader_Details_Right">[[ m[9] != 'None' and m[9] or '' ]]</para> |
257 | - </td> |
258 | - <td> |
259 | - <para style="terp_tblheader_Details_Right">[[ m[10] != 'None' and m[10] or '' ]]</para> |
260 | - </td> |
261 | - <td> |
262 | - <para style="terp_tblheader_Details_Right">[[ m[11] != 'None' and m[11] or '' ]]</para> |
263 | - </td> |
264 | - <td> |
265 | - <para style="terp_tblheader_Details_Right">Total</para> |
266 | - </td> |
267 | - </tr> |
268 | - </blockTable> |
269 | - <section> |
270 | - <para style="terp_default_1">[[ repeatIn(get_employee(data['form']),'e') ]]</para> |
271 | - <blockTable colWidths="55.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,57.0" style="Table2"> |
272 | - <tr> |
273 | - <td> |
274 | - <para style="terp_default_9">[[ e[0] ]]</para> |
275 | - </td> |
276 | - <td> |
277 | - <para style="terp_default_Right_8"> |
278 | - <font face="Helvetica" size="5.0">[[ (e[1]!='' and formatLang(e[1])) or removeParentNode('font') ]]</font> |
279 | - </para> |
280 | - </td> |
281 | - <td> |
282 | - <para style="terp_default_Right_8"> |
283 | - <font face="Helvetica" size="5.0">[[ (e[2]!='' and formatLang(e[2])) or removeParentNode('font') ]]</font> |
284 | - </para> |
285 | - </td> |
286 | - <td> |
287 | - <para style="terp_default_Right_8"> |
288 | - <font face="Helvetica" size="5.0">[[ (e[3]!='' and formatLang(e[3])) or removeParentNode('font') ]]</font> |
289 | - </para> |
290 | - </td> |
291 | - <td> |
292 | - <para style="terp_default_Right_8"> |
293 | - <font face="Helvetica" size="5.0">[[ (e[4]!='' and formatLang(e[4])) or removeParentNode('font') ]]</font> |
294 | - </para> |
295 | - </td> |
296 | - <td> |
297 | - <para style="terp_default_Right_8"> |
298 | - <font face="Helvetica" size="5.0">[[ (e[5]!='' and formatLang(e[5])) or removeParentNode('font') ]]</font> |
299 | - </para> |
300 | - </td> |
301 | - <td> |
302 | - <para style="terp_default_Right_8"> |
303 | - <font face="Helvetica" size="5.0">[[ (e[6]!='' and formatLang(e[6])) or removeParentNode('font') ]]</font> |
304 | - </para> |
305 | - </td> |
306 | - <td> |
307 | - <para style="terp_default_Right_8"> |
308 | - <font face="Helvetica" size="5.0">[[ (e[7]!='' and formatLang(e[7])) or removeParentNode('font') ]]</font> |
309 | - </para> |
310 | - </td> |
311 | - <td> |
312 | - <para style="terp_default_Right_8"> |
313 | - <font face="Helvetica" size="5.0">[[ (e[8]!='' and formatLang(e[8])) or removeParentNode('font') ]]</font> |
314 | - </para> |
315 | - </td> |
316 | - <td> |
317 | - <para style="terp_default_Right_8"> |
318 | - <font face="Helvetica" size="5.0">[[ (e[9]!='' and formatLang(e[9])) or removeParentNode('font') ]]</font> |
319 | - </para> |
320 | - </td> |
321 | - <td> |
322 | - <para style="terp_default_Right_8"> |
323 | - <font face="Helvetica" size="5.0">[[ (e[10]!='' and formatLang(e[10])) or removeParentNode('font') ]]</font> |
324 | - </para> |
325 | - </td> |
326 | - <td> |
327 | - <para style="terp_default_Right_8"> |
328 | - <font face="Helvetica" size="5.0">[[ (e[11]!='' and formatLang(e[11])) or removeParentNode('font') ]]</font> |
329 | - </para> |
330 | - </td> |
331 | - <td> |
332 | - <para style="terp_default_Right_8"> |
333 | - <font face="Helvetica" size="5.0">[[ (e[12]!='' and formatLang(e[12])) or removeParentNode('font') ]]</font> |
334 | - </para> |
335 | - </td> |
336 | - <td> |
337 | - <para style="terp_default_Right_9_Bold">[[ formatLang(e[13],currency_obj= company.currency_id)]] </para> |
338 | - </td> |
339 | - </tr> |
340 | - </blockTable> |
341 | - </section> |
342 | - </section> |
343 | - <section> |
344 | - <para style="terp_default_1">[[ repeatIn(get_months_tol(),'t') ]]</para> |
345 | - <blockTable colWidths="55.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,40.0,57.0" style="Table6"> |
346 | - <tr> |
347 | - <td> |
348 | - <para style="terp_tblheader_Details">Total</para> |
349 | - </td> |
350 | - <td> |
351 | - <para style="terp_tblheader_General_Right">[[ formatLang(t[1],currency_obj= company.currency_id) or removeParentNode('para') ]] </para> |
352 | - </td> |
353 | - <td> |
354 | - <para style="terp_tblheader_General_Right">[[ formatLang(t[2],currency_obj= company.currency_id) or removeParentNode('para')]] </para> |
355 | - </td> |
356 | - <td> |
357 | - <para style="terp_tblheader_General_Right">[[ formatLang(t[3],currency_obj= company.currency_id) or removeParentNode('para')]] </para> |
358 | - </td> |
359 | - <td> |
360 | - <para style="terp_tblheader_General_Right">[[ formatLang(t[4],currency_obj= company.currency_id) or removeParentNode('para')]] </para> |
361 | - </td> |
362 | - <td> |
363 | - <para style="terp_tblheader_General_Right">[[ formatLang(t[5],currency_obj= company.currency_id) or removeParentNode('para')]] </para> |
364 | - </td> |
365 | - <td> |
366 | - <para style="terp_tblheader_General_Right">[[ formatLang(t[6],currency_obj= company.currency_id) or removeParentNode('para')]] </para> |
367 | - </td> |
368 | - <td> |
369 | - <para style="terp_tblheader_General_Right">[[ formatLang(t[7],currency_obj= company.currency_id) or removeParentNode('para')]] ]</para> |
370 | - </td> |
371 | - <td> |
372 | - <para style="terp_tblheader_General_Right">[[ formatLang(t[8],currency_obj= company.currency_id) or removeParentNode('para')]] </para> |
373 | - </td> |
374 | - <td> |
375 | - <para style="terp_tblheader_General_Right">[[ formatLang(t[9],currency_obj= company.currency_id) or removeParentNode('para')]] </para> |
376 | - </td> |
377 | - <td> |
378 | - <para style="terp_tblheader_General_Right">[[ formatLang(t[10],currency_obj= company.currency_id) or removeParentNode('para')]] </para> |
379 | - </td> |
380 | - <td> |
381 | - <para style="terp_tblheader_General_Right">[[ formatLang(t[11],currency_obj= company.currency_id) or removeParentNode('para')]] </para> |
382 | - </td> |
383 | - <td> |
384 | - <para style="terp_tblheader_General_Right">[[ formatLang(t[12],currency_obj= company.currency_id) or removeParentNode('para')]] </para> |
385 | - </td> |
386 | - <td> |
387 | - <para style="terp_tblheader_General_Right">[[ formatLang(get_total(), currency_obj = company.currency_id)]]</para> |
388 | - </td> |
389 | - </tr> |
390 | - </blockTable> |
391 | - </section> |
392 | - </story> |
393 | -</document> |
394 | |
395 | === removed file 'l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.sxw' |
396 | Binary files l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.sxw 2012-10-03 07:14:21 +0000 and l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.sxw 1970-01-01 00:00:00 +0000 differ |
397 | === added directory 'l10n_in_hr_payroll/views' |
398 | === added file 'l10n_in_hr_payroll/views/report_hrsalarybymonth.xml' |
399 | --- l10n_in_hr_payroll/views/report_hrsalarybymonth.xml 1970-01-01 00:00:00 +0000 |
400 | +++ l10n_in_hr_payroll/views/report_hrsalarybymonth.xml 2014-04-23 06:59:38 +0000 |
401 | @@ -0,0 +1,52 @@ |
402 | +<?xml version="1.0" encoding="utf-8"?> |
403 | +<openerp> |
404 | +<data> |
405 | + <template id="report_hrsalarybymonth"> |
406 | + <t t-call="report.html_container"> |
407 | + <t t-call="report.internal_layout"> |
408 | + <div class="page"> |
409 | + <div class="text-center"> |
410 | + <h4 class="text-center"><strong>Yearly Salary Details</strong></h4> |
411 | + <h5>From <u><span t-esc="formatLang(data['form']['start_date'], date=True)"/></u> To <u><span t-esc="formatLang(data['form']['end_date'], date=True)"/></u> of <u><span t-esc="data['form']['category_id'][1]"/></u> Category</h5> |
412 | + </div> |
413 | + <table class="table table-condensed"> |
414 | + <thead> |
415 | + <tr style="border-top: 1px solid black"> |
416 | + <th>Name</th> |
417 | + <t t-foreach="get_periods(data['form'])" t-as="m"> |
418 | + <t t-foreach="m" t-as="month"> |
419 | + <th class="text-right" t-esc="month" /> |
420 | + </t> |
421 | + </t> |
422 | + <th class="text-right">Total</th> |
423 | + </tr> |
424 | + </thead> |
425 | + <tbody> |
426 | + <t t-foreach="get_employee(data['form'])" t-as="e"> |
427 | + <tr> |
428 | + <td t-esc="e[0]" /> |
429 | + <t t-foreach="e[1:13]" t-as="month_sal"> |
430 | + <td class="text-right" t-esc="month_sal" /> |
431 | + </t> |
432 | + <td class="text-right" t-esc="formatLang(e[13],currency_obj= company.currency_id)" /> |
433 | + </tr> |
434 | + </t> |
435 | + </tbody> |
436 | + <tfoot> |
437 | + <tr class="border-black"> |
438 | + <t t-foreach="get_months_tol()" t-as="t"> |
439 | + <td><strong><span>Total</span></strong></td> |
440 | + <t t-foreach="t" t-as="tdata"> |
441 | + <td class="text-right"><strong><span t-esc="formatLang(tdata, currency_obj=company.currency_id)"/></strong></td> |
442 | + </t> |
443 | + <td class="text-right"><strong><span t-esc="formatLang(get_total(), currency_obj=company.currency_id)" /></strong></td> |
444 | + </t> |
445 | + </tr> |
446 | + </tfoot> |
447 | + </table> |
448 | + </div> |
449 | + </t> |
450 | + </t> |
451 | + </template> |
452 | +</data> |
453 | +</openerp> |
454 | \ No newline at end of file |
455 | |
456 | === modified file 'l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py' |
457 | --- l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py 2013-10-27 12:31:04 +0000 |
458 | +++ l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py 2014-04-23 06:59:38 +0000 |
459 | @@ -20,7 +20,6 @@ |
460 | ############################################################################## |
461 | |
462 | import time |
463 | - |
464 | from openerp.osv import fields, osv |
465 | |
466 | class hr_salary_employee_bymonth(osv.osv_memory): |
467 | @@ -60,11 +59,8 @@ |
468 | res = self.read(cr, uid, ids, context=context) |
469 | res = res and res[0] or {} |
470 | datas.update({'form': res}) |
471 | - return { |
472 | - 'type': 'ir.actions.report.xml', |
473 | - 'report_name': 'salary.employee.bymonth', |
474 | - 'datas': datas, |
475 | - } |
476 | - |
477 | - |
478 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
479 | \ No newline at end of file |
480 | + return self.pool['report'].get_action(cr, uid, ids, |
481 | + 'l10n_in_hr_payroll.report_hrsalarybymonth', |
482 | + data=datas, context=context) |
483 | + |
484 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |