diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index 231491dd15a..61c4e11edaa 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -49,6 +49,8 @@ Indian Payroll Salary Rules. 'security/ir.model.access.csv', 'l10n_in_hr_payroll_report.xml', 'l10n_in_hr_payroll_sequence.xml', + 'views/report_payslipdetails.xml', + 'views/report_hrsalarybymonth.xml', 'wizard/hr_salary_employee_bymonth_view.xml', 'wizard/hr_yearly_salary_detail_view.xml', 'report/payment_advice_report_view.xml', diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml index 90760d4b12f..3e1e8e529c5 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml @@ -3,12 +3,12 @@ + string="PaySlip Details" + report_type="qweb-pdf" + name="l10n_in_hr_payroll.report_payslipdetails" + file="l10n_in_hr_payroll.report_payslipdetails" /> - + 'None': + if month <> '': if len(month) != 7: month = '0' + str(month) if month in salary and salary[month]: @@ -102,7 +102,7 @@ class report_hr_salary_employee_bymonth(report_sxw.rml_parse): def get_employee(self, form): emp_salary = [] salary_list = [] - total_mnths=['Total', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + total_mnths=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] emp_obj = self.pool.get('hr.employee') emp_ids = form.get('employee_ids', []) employees = emp_obj.browse(self.cr, self.uid, emp_ids, context=self.context) @@ -128,6 +128,10 @@ class report_hr_salary_employee_bymonth(report_sxw.rml_parse): self.total += item[count] return self.total -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') +class wrapped_report_employee_salary_bymonth(osv.AbstractModel): + _name = 'report.l10n_in_hr_payroll.report_hrsalarybymonth' + _inherit = 'report.abstract_report' + _template = 'l10n_in_hr_payroll.report_hrsalarybymonth' + _wrapped_report_class = report_hr_salary_employee_bymonth -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml deleted file mode 100644 index 6368a644f4b..00000000000 --- a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Yearly Salary Details - From [[ formatLang(data['form']['start_date'], date=True) ]] To [[ formatLang(data['form']['end_date'], date=True) ]] of [[ (data['form']['category_id'][1]) ]] Category - - - -
- [[ repeatIn(get_periods(data['form']),'m') ]] - - - - Name - - - [[ m[0] != 'None' and m[0] or '' ]] - - - [[ m[1] != 'None' and m[1] or '' ]] - - - [[ m[2] != 'None' and m[2] or '' ]] - - - [[ m[3] != 'None' and m[3] or '' ]] - - - [[ m[4] != 'None' and m[4] or '' ]] - - - [[ m[5] != 'None' and m[5] or '' ]] - - - [[ m[6] != 'None' and m[6] or '' ]] - - - [[ m[7] != 'None' and m[7] or '' ]] - - - [[ m[8] != 'None' and m[8] or '' ]] - - - [[ m[9] != 'None' and m[9] or '' ]] - - - [[ m[10] != 'None' and m[10] or '' ]] - - - [[ m[11] != 'None' and m[11] or '' ]] - - - Total - - - -
- [[ repeatIn(get_employee(data['form']),'e') ]] - - - - [[ e[0] ]] - - - - [[ (e[1]!='' and formatLang(e[1])) or removeParentNode('font') ]] - - - - - [[ (e[2]!='' and formatLang(e[2])) or removeParentNode('font') ]] - - - - - [[ (e[3]!='' and formatLang(e[3])) or removeParentNode('font') ]] - - - - - [[ (e[4]!='' and formatLang(e[4])) or removeParentNode('font') ]] - - - - - [[ (e[5]!='' and formatLang(e[5])) or removeParentNode('font') ]] - - - - - [[ (e[6]!='' and formatLang(e[6])) or removeParentNode('font') ]] - - - - - [[ (e[7]!='' and formatLang(e[7])) or removeParentNode('font') ]] - - - - - [[ (e[8]!='' and formatLang(e[8])) or removeParentNode('font') ]] - - - - - [[ (e[9]!='' and formatLang(e[9])) or removeParentNode('font') ]] - - - - - [[ (e[10]!='' and formatLang(e[10])) or removeParentNode('font') ]] - - - - - [[ (e[11]!='' and formatLang(e[11])) or removeParentNode('font') ]] - - - - - [[ (e[12]!='' and formatLang(e[12])) or removeParentNode('font') ]] - - - - [[ formatLang(e[13],currency_obj= company.currency_id)]] - - - -
-
-
- [[ repeatIn(get_months_tol(),'t') ]] - - - - Total - - - [[ formatLang(t[1],currency_obj= company.currency_id) or removeParentNode('para') ]] - - - [[ formatLang(t[2],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[3],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[4],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[5],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[6],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[7],currency_obj= company.currency_id) or removeParentNode('para')]] ] - - - [[ formatLang(t[8],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[9],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[10],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[11],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(t[12],currency_obj= company.currency_id) or removeParentNode('para')]] - - - [[ formatLang(get_total(), currency_obj = company.currency_id)]] - - - -
-
-
diff --git a/addons/l10n_in_hr_payroll/report/report_payslip_details.py b/addons/l10n_in_hr_payroll/report/report_payslip_details.py index 37cb7c2a0b7..2c3b20fcd7a 100644 --- a/addons/l10n_in_hr_payroll/report/report_payslip_details.py +++ b/addons/l10n_in_hr_payroll/report/report_payslip_details.py @@ -20,6 +20,7 @@ ############################################################################## from openerp.report import report_sxw +from openerp.osv import osv from openerp.addons.hr_payroll import report class payslip_details_report_in(report.report_payslip_details.payslip_details_report): @@ -30,6 +31,10 @@ class payslip_details_report_in(report.report_payslip_details.payslip_details_re 'get_details_by_rule_category': self.get_details_by_rule_category, }) -report_sxw.report_sxw('report.paylip.details.in', 'hr.payslip', 'l10n_in_hr_payroll/report/report_payslip_details.rml', parser=payslip_details_report_in) +class wrapped_report_payslipdetailsin(osv.AbstractModel): + _name = 'report.l10n_in_hr_payroll.report_payslipdetails' + _inherit = 'report.abstract_report' + _template = 'l10n_in_hr_payroll.report_payslipdetails' + _wrapped_report_class = payslip_details_report_in # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_in_hr_payroll/report/report_payslip_details.rml b/addons/l10n_in_hr_payroll/report/report_payslip_details.rml deleted file mode 100644 index c4ce55bfa41..00000000000 --- a/addons/l10n_in_hr_payroll/report/report_payslip_details.rml +++ /dev/null @@ -1,372 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[repeatIn(objects,'o')]] - - - - Pay Slip Details - - - - - [[o.credit_note==False and removeParentNode('para')]] - Credit - - Note - - ([[o.name or removeParentNode('para')]]) - - - - Name - - - [[o.employee_id.name]] - - - Designation - - - [[ o.employee_id.job_id.name or '' ]] - - - - - - - - Address - - - - [[o.employee_id.address_home_id and o.employee_id.address_home_id.name or '' ]],[[o.employee_id.address_home_id and display_address(o.employee_id.address_home_id)]] - - - - - - - Email - - - [[ o.employee_id.work_email or '' ]] - - - - Identification No - - - - [[ o.employee_id.identification_id or '' ]] - - - - - - - Reference - - - [[ o.number or '' ]] - - - Bank Account - - - [[ o.employee_id.otherid or '' ]] - - - - - - - Date From - - - [[ o.date_from or '']] - - - - Date To - - - - [[ o.date_to or '' ]] - - - - - - - - - - - - - - Details by Salary Rule Category: - - - - - - - Code - - - Salary Rule Category - - - Total - - - - - - -
- [[repeatIn(get_details_by_rule_category(o.details_by_salary_rule_category),'h') ]] - - - - - [[ h['code'] ]] - [[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font')]] - - - - [[ '..'*h['level'] ]][[ h['rule_category'] ]][[ h['level']!=0 and ( setTag('para','para',{'style':'terp_default_8'})) or removeParentNode('font') ]] - - - [[ formatLang(h['total'], currency_obj = o.company_id and o.company_id.currency_id)]] [[ h['level']==0 and ( setTag('para','para',{'style':'terp_default_10'})) or removeParentNode('font') ]] - - - -
- - - - - - - - - - - - - - - - - - - - - - Authorized Signature - - - - - - -
-
- diff --git a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml new file mode 100644 index 00000000000..57fadad5865 --- /dev/null +++ b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml @@ -0,0 +1,60 @@ + + + + + + diff --git a/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml b/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml new file mode 100644 index 00000000000..426a71de1ee --- /dev/null +++ b/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml @@ -0,0 +1,94 @@ + + + + + + \ No newline at end of file diff --git a/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py b/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py index 93594e1dff8..6e37f5b58d5 100644 --- a/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py +++ b/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py @@ -20,7 +20,6 @@ ############################################################################## import time - from openerp.osv import fields, osv class hr_salary_employee_bymonth(osv.osv_memory): @@ -60,11 +59,8 @@ class hr_salary_employee_bymonth(osv.osv_memory): res = self.read(cr, uid, ids, context=context) res = res and res[0] or {} datas.update({'form': res}) - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'salary.employee.bymonth', - 'datas': datas, - } + return self.pool['report'].get_action(cr, uid, ids, + 'l10n_in_hr_payroll.report_hrsalarybymonth', + data=datas, context=context) - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: