From a491127ab94fa2df63addd49601e30709c091a46 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Mon, 21 Apr 2014 14:43:11 +0530 Subject: [PATCH 01/27] [IMP]: l10n_in_hr_payroll: Convert Yearly Salary by Head report from RML report to QWEB bzr revid: rsi@tinyerp.com-20140421091311-9ymvwu2g4nn3h630 --- addons/l10n_in_hr_payroll/__openerp__.py | 1 + .../l10n_in_hr_payroll_report.xml | 14 +- .../report_hr_salary_employee_bymonth.py | 14 +- .../report_hr_salary_employee_bymonth.rml | 293 ------------------ .../wizard/hr_salary_employee_bymonth.py | 12 +- 5 files changed, 21 insertions(+), 313 deletions(-) delete mode 100644 addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.rml diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index 2522d543548..3ffa88729b0 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -49,6 +49,7 @@ Indian Payroll Salary Rules. 'security/ir.model.access.csv', 'l10n_in_hr_payroll_report.xml', 'l10n_in_hr_payroll_sequence.xml', + 'views/report_hr_salary_employee_bymonth.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 7f27291051f..804236c0c68 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 @@ -18,13 +18,13 @@ rml="l10n_in_hr_payroll/report/report_payroll_advice.rml" string="Print Advice" /> - + 'None': + if month <> '': if len(month) != 7: month = '0' + str(month) if month in salary and salary[month]: @@ -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 employee_salary_bymonth(osv.AbstractModel): + _name = 'report.l10n_in_hr_payroll.employee_salary_bymonth' + _inherit = 'report.abstract_report' + _template = 'l10n_in_hr_payroll.employee_salary_bymonth' + _wrapped_report_class = report_hr_salary_employee_bymonth # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file 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/wizard/hr_salary_employee_bymonth.py b/addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py index 93594e1dff8..113ad52620d 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.employee_salary_bymonth', + 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: From 7d72983357b866f13e3ba31c72d73a27a498ce4b Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Mon, 21 Apr 2014 15:23:14 +0530 Subject: [PATCH 02/27] [ADD]: Add the view file of the QWEB report bzr revid: rsi@tinyerp.com-20140421095314-mq4o9qhi2efl5jai --- .../report_hr_salary_employee_bymonth.xml | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 addons/l10n_in_hr_payroll/views/report_hr_salary_employee_bymonth.xml diff --git a/addons/l10n_in_hr_payroll/views/report_hr_salary_employee_bymonth.xml b/addons/l10n_in_hr_payroll/views/report_hr_salary_employee_bymonth.xml new file mode 100644 index 00000000000..473c8148118 --- /dev/null +++ b/addons/l10n_in_hr_payroll/views/report_hr_salary_employee_bymonth.xml @@ -0,0 +1,75 @@ + + + + + + \ No newline at end of file From 2e67cf77de903671f7af9b20955893687a826c91 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Tue, 22 Apr 2014 11:01:21 +0530 Subject: [PATCH 03/27] [IMP]: Change the file attribute value in report bzr revid: rsi@tinyerp.com-20140422053121-e146c69xlxbl3lum --- addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 804236c0c68..795d0feabd4 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 @@ -23,7 +23,7 @@ string="Yearly Salary by Head" model="hr.salary.employee.month" report_type="qweb-pdf" - file="Yearly Salary By Head" + file="l10n_in_hr_payroll.employee_salary_bymonth" name="l10n_in_hr_payroll.employee_salary_bymonth"/> Date: Tue, 22 Apr 2014 17:39:15 +0530 Subject: [PATCH 04/27] [IMP]: Remove the inline CSS bzr revid: rsi@tinyerp.com-20140422120915-wpkrw1v1zmjugx5d --- addons/l10n_in_hr_payroll/__openerp__.py | 2 +- .../l10n_in_hr_payroll_report.xml | 6 +- .../report_hr_salary_employee_bymonth.py | 4 +- .../report_hr_salary_employee_bymonth.xml | 75 ------------------- .../views/report_hrsalarybymonth.xml | 74 ++++++++++++++++++ .../wizard/hr_salary_employee_bymonth.py | 2 +- 6 files changed, 81 insertions(+), 82 deletions(-) delete mode 100644 addons/l10n_in_hr_payroll/views/report_hr_salary_employee_bymonth.xml create mode 100644 addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index 3ffa88729b0..c86ad06c387 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -49,7 +49,7 @@ Indian Payroll Salary Rules. 'security/ir.model.access.csv', 'l10n_in_hr_payroll_report.xml', 'l10n_in_hr_payroll_sequence.xml', - 'views/report_hr_salary_employee_bymonth.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 795d0feabd4..dc07633ea3d 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 @@ -19,12 +19,12 @@ string="Print Advice" /> + file="l10n_in_hr_payroll.report_hrsalarybymonth" + name="l10n_in_hr_payroll.report_hrsalarybymonth"/> - - - - - \ No newline at end of file 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..94d2faa18da --- /dev/null +++ b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml @@ -0,0 +1,74 @@ + + + + + + \ 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 113ad52620d..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 @@ -60,7 +60,7 @@ class hr_salary_employee_bymonth(osv.osv_memory): res = res and res[0] or {} datas.update({'form': res}) return self.pool['report'].get_action(cr, uid, ids, - 'l10n_in_hr_payroll.employee_salary_bymonth', + 'l10n_in_hr_payroll.report_hrsalarybymonth', data=datas, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 5fdb6292b1d492a793b9ce75852cef30a49f8591 Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Tue, 22 Apr 2014 18:07:57 +0530 Subject: [PATCH 05/27] [imp]:add qweb report and remove rml report bzr revid: ssh@tinyerp.com-20140422123757-6wskvlwyltlyjvp0 --- addons/l10n_in_hr_payroll/__openerp__.py | 1 + .../l10n_in_hr_payroll_report.xml | 5 +- .../report/report_hr_yearly_salary_detail.py | 11 +- .../report/report_hr_yearly_salary_detail.rml | 588 ------------------ .../view/report_hr_yearly_salary_detail.xml | 103 +++ .../wizard/hr_yearly_salary_detail.py | 9 +- 6 files changed, 117 insertions(+), 600 deletions(-) delete mode 100644 addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.rml create mode 100644 addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index 2522d543548..231491dd15a 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -53,6 +53,7 @@ Indian Payroll Salary Rules. 'wizard/hr_yearly_salary_detail_view.xml', 'report/payment_advice_report_view.xml', 'report/payslip_report_view.xml', + 'view/report_hr_yearly_salary_detail.xml', ], 'test': [ 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 7f27291051f..90760d4b12f 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 @@ -30,8 +30,9 @@ auto="False" id="yearly_salary" model="yearly.salary.detail" - name="salary.detail.byyear" - rml="l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.rml" + name="l10n_in_hr_payroll.report_hr_yearly_salary" + file="l10n_in_hr_payroll.report_hr_yearly_salary" + report_type="qweb-pdf" string="Yearly Salary by Employee" /> diff --git a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py index 220bcdb5552..e531a335e7c 100644 --- a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py +++ b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py @@ -22,6 +22,7 @@ import time import datetime from openerp.report import report_sxw +from openerp.osv import osv class employees_yearly_salary_report(report_sxw.rml_parse): @@ -64,8 +65,8 @@ class employees_yearly_salary_report(report_sxw.rml_parse): current_year = last_year current_month = current_month + 1 for c in range(0, (12-no_months)): - mnth_name.append('None') - self.mnths.append('None') + mnth_name.append('') + self.mnths.append('') return [mnth_name] def get_employee(self, form): @@ -159,6 +160,10 @@ class employees_yearly_salary_report(report_sxw.rml_parse): def get_total(self): return self.total -report_sxw.report_sxw('report.salary.detail.byyear', 'yearly.salary.detail', 'hr_payroll/report/report_hr_yearly_salary_detail.rml', parser=employees_yearly_salary_report, header='internal landscape') +class wrapped_report_payslip(osv.AbstractModel): + _name = 'report.l10n_in_hr_payroll.report_hr_yearly_salary' + _inherit = 'report.abstract_report' + _template = 'l10n_in_hr_payroll.report_hr_yearly_salary' + _wrapped_report_class = employees_yearly_salary_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.rml b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.rml deleted file mode 100644 index 502eaa7b0ff..00000000000 --- a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.rml +++ /dev/null @@ -1,588 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(get_employee(data['form']), 'o') ]] - - - - From [[ formatLang(data['form']['date_from'], date=True) ]] To [[ formatLang(data['form']['date_to'], date=True) ]] - - - - - - - - - - Employee Code - - - [[ o.identification_id ]] - - - Department - - - [[ o.department_id and o.department_id.name or '' ]] - - - Bank - - - [[ o.bank_account_id and o.bank_account_id.bank.name or '' ]] - - - - - - - Employee Name - - - [[ o.name ]] - - - Other No. - - - [[ o.otherid or '' ]] - - - Address - - - [[o.address_home_id and o.address_home_id.name or '' ]] - - - - - - - Designation - - - [[ o.job_id and o.job_id.name or '' ]] - - - Phone No. - - - [[ o.work_phone or '' ]] - - - E-mail Address - - - [[o.work_email or '' ]] - - - - - - -
- [[ repeatIn(get_periods(data['form']),'m') ]] - [[ get_employee_detail((data['form']),o) ]] - - - - Title - - - [[ 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 - - - - - - -
- - - - Allowances with Basic: - - - -
- [[ repeatIn(get_allow(),'e1') ]] - - - - [[ e1[0] in ["Basic","Gross"] and e1[0] ]] - [[ e1[0] not in ["Basic","Gross"] and e1[0] ]] - - - - [[ (e1[0] in ["Basic","Gross"] and e1[1]!='' and formatLang(e1[1])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[1]!='' and formatLang(e1[1])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[2]!='' and formatLang(e1[2])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[2]!='' and formatLang(e1[2])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[3]!='' and formatLang(e1[3])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[3]!='' and formatLang(e1[3])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[4]!='' and formatLang(e1[4])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[4]!='' and formatLang(e1[4])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[5]!='' and formatLang(e1[5])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[5]!='' and formatLang(e1[5])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[6]!='' and formatLang(e1[6])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[6]!='' and formatLang(e1[6])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[7]!='' and formatLang(e1[7])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[7]!='' and formatLang(e1[7])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[8]!='' and formatLang(e1[8])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[8]!='' and formatLang(e1[8])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[9]!='' and formatLang(e1[9])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[9]!='' and formatLang(e1[9])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[10]!='' and formatLang(e1[10])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[10]!='' and formatLang(e1[10])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[11]!='' and formatLang(e1[11])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[11]!='' and formatLang(e1[11])) or removeParentNode('font') ]] - - - - - [[ (e1[0] in ["Basic","Gross"] and e1[12]!='' and formatLang(e1[12])) or removeParentNode('font') ]] - [[ (e1[0] not in ["Basic","Gross"] and e1[12]!='' and formatLang(e1[12])) or removeParentNode('font') ]] - - - - [[ formatLang(e1[13],currency_obj= company.currency_id) ]] - - - -
- - - - Deductions: - - - -
- [[ repeatIn(get_deduct(),'e2') ]] - - - - [[ e2[0] in ["Net"] and e2[0] ]] - [[ e2[0] not in ["Net"] and e2[0] ]] - - - - [[ (e2[0] in ["Net"] and e2[1]!='' and formatLang(e2[1])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[1]!='' and formatLang(e2[1])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[2]!='' and formatLang(e2[2])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[2]!='' and formatLang(e2[2])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[3]!='' and formatLang(e2[3])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[3]!='' and formatLang(e2[3])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[4]!='' and formatLang(e2[4])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[4]!='' and formatLang(e2[4])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[5]!='' and formatLang(e2[5])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[5]!='' and formatLang(e2[5])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[6]!='' and formatLang(e2[6])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[6]!='' and formatLang(e2[6])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[7]!='' and formatLang(e2[7])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[7]!='' and formatLang(e2[7])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[8]!='' and formatLang(e2[8])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[8]!='' and formatLang(e2[8])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[9]!='' and formatLang(e2[9])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[9]!='' and formatLang(e2[9])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[10]!='' and formatLang(e2[10])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[10]!='' and formatLang(e2[10])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[11]!='' and formatLang(e2[11])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[11]!='' and formatLang(e2[11])) or removeParentNode('font') ]] - - - - - [[ (e2[0] in ["Net"] and e2[12]!='' and formatLang(e2[12])) or removeParentNode('font') ]] - [[ (e2[0] not in ["Net"] and e2[12]!='' and formatLang(e2[12])) or removeParentNode('font') ]] - - - - [[ formatLang(e2[13],currency_obj= company.currency_id) ]] - - - -
-
- - - -
- - - -
-
diff --git a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml new file mode 100644 index 00000000000..5430518e10d --- /dev/null +++ b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml @@ -0,0 +1,103 @@ + + + + + + diff --git a/addons/l10n_in_hr_payroll/wizard/hr_yearly_salary_detail.py b/addons/l10n_in_hr_payroll/wizard/hr_yearly_salary_detail.py index de3680f2dd3..ec36a80dd46 100644 --- a/addons/l10n_in_hr_payroll/wizard/hr_yearly_salary_detail.py +++ b/addons/l10n_in_hr_payroll/wizard/hr_yearly_salary_detail.py @@ -54,12 +54,7 @@ class yearly_salary_detail(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.detail.byyear', - 'datas': datas, - } - + datas.update({'form':res}) + return self.pool['report'].get_action(cr, uid, ids, 'l10n_in_hr_payroll.report_hr_yearly_salary', data=datas, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From f44148ba221803ce29fbe368b2708b1b3a935674 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Tue, 22 Apr 2014 19:23:08 +0530 Subject: [PATCH 06/27] [IMP]: Optimize the code bzr revid: rsi@tinyerp.com-20140422135308-ixhpb0d4lbbecl2z --- .../views/report_hrsalarybymonth.xml | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml index 94d2faa18da..a2e3de1ef32 100644 --- a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml +++ b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml @@ -10,61 +10,61 @@
From To of Category
- - - - - - - - + + + + - - - - + + + + - + + + + + + + + + + + + + + + +
Name - - - - - - - - - - - - - Total
- - - - - - - - - - - - - +
Name + + + + + + + + + + + + + Total
- - - - - - - - - - - - - +
+ + + + + + + + + + + + + +
-
Total
From 06ca6d2540add7e8534dea69aa62a4b5aa2a1747 Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Wed, 23 Apr 2014 10:59:10 +0530 Subject: [PATCH 07/27] [imp]:improve code bzr revid: ssh@tinyerp.com-20140423052910-486im2lmzpqev14n --- .../view/report_hr_yearly_salary_detail.xml | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml index 5430518e10d..fc7a2fd4b9f 100644 --- a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml @@ -36,19 +36,43 @@ Employee Name - + + + + + Other No. - + + + + + Address - + + + + + Designation - + + + + + Phone No. - + + + + + E-mail Address - + + + + + From be542630e88d834cc20401cafda990f2a47a9ba7 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Wed, 23 Apr 2014 12:27:55 +0530 Subject: [PATCH 08/27] [IMP]: Code optimization in the view file bzr revid: rsi@tinyerp.com-20140423065755-83tyantoitle2ow4 --- .../report_hr_salary_employee_bymonth.py | 4 +- .../views/report_hrsalarybymonth.xml | 38 ++++--------------- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py index 6d29bd82efc..8873f6e2465 100644 --- a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py +++ b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py @@ -81,7 +81,7 @@ class report_hr_salary_employee_bymonth(report_sxw.rml_parse): sal = self.cr.fetchall() salary = dict(sal) total = 0.0 - cnt = 1 + cnt = 0 for month in self.mnths: if 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) diff --git a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml index a2e3de1ef32..18a81412e26 100644 --- a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml +++ b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml @@ -14,18 +14,9 @@ Name - - - - - - - - - - - - + + + Total @@ -34,18 +25,9 @@ - - - - - - - - - - - - + + + @@ -53,13 +35,9 @@ + Total - - Total - - - - + From f15123df698df890916a880ac6b5e10e7e73a045 Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Wed, 23 Apr 2014 15:23:39 +0530 Subject: [PATCH 09/27] [imp]:improve code firsr first call layout then foreach loop bzr revid: ssh@tinyerp.com-20140423095339-lkswkyqyhw1cm6oj --- .../view/report_hr_yearly_salary_detail.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml index fc7a2fd4b9f..8a82db03497 100644 --- a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml @@ -3,9 +3,9 @@ From 7932140dd1ac195ccb371de79409bea5a35b47a4 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Wed, 23 Apr 2014 19:00:32 +0530 Subject: [PATCH 10/27] [IMP]: convert rml to qweb report of Payslip Details bzr revid: rsi@tinyerp.com-20140423133032-l1wxnoyytdakdnpx --- addons/l10n_in_hr_payroll/__openerp__.py | 1 + .../l10n_in_hr_payroll_report.xml | 8 +- .../report/report_payslip_details.py | 7 +- .../report/report_payslip_details.rml | 372 ------------------ 4 files changed, 11 insertions(+), 377 deletions(-) delete mode 100644 addons/l10n_in_hr_payroll/report/report_payslip_details.rml diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index 2522d543548..adccb9cabd4 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -49,6 +49,7 @@ 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', '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 7f27291051f..077bf5debf8 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" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[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 - - - - - - -
-
- From c43d5235a5fe514038c2f04219281327da11fd75 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Wed, 23 Apr 2014 19:04:03 +0530 Subject: [PATCH 11/27] [ADD]: add the view file of Payslip Details bzr revid: rsi@tinyerp.com-20140423133403-60ukgyi8uy4j6g4k --- .../views/report_payslipdetails.xml | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 addons/l10n_in_hr_payroll/views/report_payslipdetails.xml 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..0db3e17c7ee --- /dev/null +++ b/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml @@ -0,0 +1,93 @@ + + + + + + \ No newline at end of file From 2c042b1824e0a38f561621ac1333c7281476e073 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Wed, 23 Apr 2014 21:37:40 +0530 Subject: [PATCH 12/27] [IMP]: Renamed wrapped class bzr revid: atp@tinyerp.com-20140423160740-qnz5k1bnjyybgk9v --- .../report/report_hr_salary_employee_bymonth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py index 8873f6e2465..31ea9cb4b3c 100644 --- a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py +++ b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py @@ -128,10 +128,10 @@ class report_hr_salary_employee_bymonth(report_sxw.rml_parse): self.total += item[count] return self.total -class employee_salary_bymonth(osv.AbstractModel): +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: From 3446fe069547e2a07e8896abeedb238e8bf3d8df Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Thu, 24 Apr 2014 00:02:41 +0530 Subject: [PATCH 13/27] [IMP]: Improve bootstrap class with span element. bzr revid: atp@tinyerp.com-20140423183241-8c7442xgroxoik0s --- .../views/report_hrsalarybymonth.xml | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml index 18a81412e26..57fadad5865 100644 --- a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml +++ b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml @@ -6,8 +6,10 @@
-

Yearly Salary Details

-
From To of Category
+

Yearly Salary Details

+

+ From To of Category +

@@ -15,7 +17,9 @@ - @@ -24,22 +28,26 @@ - - - - + - + @@ -49,4 +57,4 @@ - \ No newline at end of file + From 45e74261e4d8f961373c8d68514bc9e37e0f1d5d Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Thu, 24 Apr 2014 10:17:56 +0530 Subject: [PATCH 14/27] [imp]:improve use a text-center class bzr revid: ssh@tinyerp.com-20140424044756-ls3g2mour8rmjtes --- .../view/report_hr_yearly_salary_detail.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml index 8a82db03497..bf64d028430 100644 --- a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml @@ -6,11 +6,11 @@
-
-
From +
+
From To -
+

Name + + + Total
+ + + + + + +
TotalTotal
From c61a1b679e9a575ca8e2e510edb2704accdd1fc8 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Thu, 24 Apr 2014 10:51:18 +0530 Subject: [PATCH 15/27] [IMP]: Add the padding to the child level bzr revid: rsi@tinyerp.com-20140424052118-y92vvkbam7cwlklj --- addons/l10n_in_hr_payroll/views/report_payslipdetails.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml b/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml index 0db3e17c7ee..4d59b5b4178 100644 --- a/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml +++ b/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml @@ -74,7 +74,7 @@ + From 1c1d9eee500a79b6db699e4fee39bbc629a6f9a7 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Fri, 25 Apr 2014 22:00:22 +0530 Subject: [PATCH 25/27] [ADD]: Add payroll advice report bzr revid: atp@tinyerp.com-20140425163022-q4fw9zcx0f7n35ox --- addons/l10n_in_hr_payroll/__openerp__.py | 2 +- .../l10n_in_hr_payroll_report.xml | 6 +- .../report/report_payroll_advice.py | 6 +- .../report/report_payroll_advice.rml | 425 ------------------ .../views/report_payrolladvice.xml | 92 ++++ 5 files changed, 101 insertions(+), 430 deletions(-) delete mode 100644 addons/l10n_in_hr_payroll/report/report_payroll_advice.rml create mode 100644 addons/l10n_in_hr_payroll/views/report_payrolladvice.xml diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index 122ff26243c..eb6b8d4165a 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -56,7 +56,7 @@ Indian Payroll Salary Rules. 'report/payment_advice_report_view.xml', 'report/payslip_report_view.xml', 'views/report_hr_yearly_salary_detail.xml', - + 'views/report_payrolladvice.xml', ], 'test': [ 'test/payment_advice.yml', 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 3e1e8e529c5..b6c04794e8a 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 @@ -14,9 +14,9 @@ auto="False" id="payroll_advice" model="hr.payroll.advice" - name="payroll.advice" - rml="l10n_in_hr_payroll/report/report_payroll_advice.rml" - string="Print Advice" /> + report_type="qweb-pdf" + name="l10n_in_hr_payroll.report_payrolladvice" + file="l10n_in_hr_payroll.report_payrolladvice"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[repeatIn(objects,'o')]] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ o.neft == True and removeParentNode('blockTable') ]] - - - - - - - - -
- [[ repeatIn(get_detail(o.line_ids),'line') ]] - [[ o.neft == True and removeParentNode('blockTable') ]] -
- - - - - - - - - [[ o.neft != True and removeParentNode('blockTable') ]] - - - - - - - - - -
- [[ repeatIn(get_detail(o.line_ids),'line') ]] - [[ o.neft !=True and removeParentNode('blockTable') ]] -
- - - - - - - - - - [[ o.neft == True and removeParentNode('blockTable') ]] - - - - - - - - - [[ o.neft !=True and removeParentNode('blockTable') ]] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addons/l10n_in_hr_payroll/views/report_payrolladvice.xml b/addons/l10n_in_hr_payroll/views/report_payrolladvice.xml new file mode 100644 index 00000000000..03bb91f567d --- /dev/null +++ b/addons/l10n_in_hr_payroll/views/report_payrolladvice.xml @@ -0,0 +1,92 @@ + + + + + + \ No newline at end of file From 105331f12a19fba7561f84bd64f8d7d2a2a0f08d Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Fri, 25 Apr 2014 22:35:24 +0530 Subject: [PATCH 26/27] [FIX]: import osv file in report file. add stringin reportxml file bzr revid: atp@tinyerp.com-20140425170524-fev2rr0uhycalp9h --- addons/l10n_in_hr_payroll/l10n_in_hr_payroll_report.xml | 3 ++- addons/l10n_in_hr_payroll/report/report_payroll_advice.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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 b6c04794e8a..9cf41633d50 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 @@ -11,9 +11,10 @@ file="l10n_in_hr_payroll.report_payslipdetails" /> diff --git a/addons/l10n_in_hr_payroll/report/report_payroll_advice.py b/addons/l10n_in_hr_payroll/report/report_payroll_advice.py index c2efe496387..41f4b5880d3 100644 --- a/addons/l10n_in_hr_payroll/report/report_payroll_advice.py +++ b/addons/l10n_in_hr_payroll/report/report_payroll_advice.py @@ -23,7 +23,7 @@ import time from datetime import datetime - +from openerp.osv import osv from openerp.report import report_sxw from openerp.tools import amount_to_text_en From ae858f4d68fa74629b2eff810c1c75754f4f2cb1 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Fri, 25 Apr 2014 23:22:30 +0530 Subject: [PATCH 27/27] [IMP]: Rename report name report_hryearly salary bzr revid: atp@tinyerp.com-20140425175230-sctyfvvn87c6exm9 --- addons/l10n_in_hr_payroll/__openerp__.py | 2 +- .../l10n_in_hr_payroll_report.xml | 4 +- .../report/report_hr_yearly_salary_detail.py | 4 +- ...y_detail.xml => report_hryearlysalary.xml} | 73 +++++++++---------- .../wizard/hr_yearly_salary_detail.py | 2 +- 5 files changed, 42 insertions(+), 43 deletions(-) rename addons/l10n_in_hr_payroll/views/{report_hr_yearly_salary_detail.xml => report_hryearlysalary.xml} (63%) diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index eb6b8d4165a..c56417fbce4 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -55,7 +55,7 @@ Indian Payroll Salary Rules. 'wizard/hr_yearly_salary_detail_view.xml', 'report/payment_advice_report_view.xml', 'report/payslip_report_view.xml', - 'views/report_hr_yearly_salary_detail.xml', + 'views/report_hryearlysalary.xml', 'views/report_payrolladvice.xml', ], 'test': [ 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 9cf41633d50..427e9111017 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 @@ -31,8 +31,8 @@ auto="False" id="yearly_salary" model="yearly.salary.detail" - name="l10n_in_hr_payroll.report_hr_yearly_salary" - file="l10n_in_hr_payroll.report_hr_yearly_salary" + name="l10n_in_hr_payroll.report_hryearlysalary" + file="l10n_in_hr_payroll.report_hryearlysalary" report_type="qweb-pdf" string="Yearly Salary by Employee" /> diff --git a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py index e531a335e7c..e396e611a3f 100644 --- a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py +++ b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py @@ -161,9 +161,9 @@ class employees_yearly_salary_report(report_sxw.rml_parse): return self.total class wrapped_report_payslip(osv.AbstractModel): - _name = 'report.l10n_in_hr_payroll.report_hr_yearly_salary' + _name = 'report.l10n_in_hr_payroll.report_hryearlysalary' _inherit = 'report.abstract_report' - _template = 'l10n_in_hr_payroll.report_hr_yearly_salary' + _template = 'l10n_in_hr_payroll.report_hryearlysalary' _wrapped_report_class = employees_yearly_salary_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/views/report_hryearlysalary.xml similarity index 63% rename from addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml rename to addons/l10n_in_hr_payroll/views/report_hryearlysalary.xml index bf9de12125e..189dfd29e5a 100644 --- a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/views/report_hryearlysalary.xml @@ -1,7 +1,7 @@ -
- + From ad71e6b87c3d841f761a65014dfc469e6bd09e4f Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Thu, 24 Apr 2014 14:14:02 +0530 Subject: [PATCH 16/27] [imp]:improve th tag to td tag bzr revid: ssh@tinyerp.com-20140424084402-gam7edp04qvyj7gu --- .../view/report_hr_yearly_salary_detail.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml index bf64d028430..13383817889 100644 --- a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml @@ -14,20 +14,20 @@
- + - + - + - - + - - + + - - + + + + + + - - - - + + - + - + + + + - + +
Employee CodeEmployee Code DepartmentDepartment BankBank From 2949a395ba7960e8ec7c4aff9c9239b1895bd396 Mon Sep 17 00:00:00 2001 From: "Rakesh Sindhav (OpenERP)" Date: Thu, 24 Apr 2014 15:31:50 +0530 Subject: [PATCH 17/27] [IMP]: set the header to left side bzr revid: rsi@tinyerp.com-20140424100150-0as1tmhipxo8tfdn --- .../l10n_in_hr_payroll/views/report_payslipdetails.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml b/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml index 4d59b5b4178..426a71de1ee 100644 --- a/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml +++ b/addons/l10n_in_hr_payroll/views/report_payslipdetails.xml @@ -6,8 +6,8 @@
-

Pay Slip Details

-
()
+

Pay Slip Details

+

@@ -43,7 +43,7 @@
-

Details by Salary Rule Category:
+

Details by Salary Rule Category

@@ -54,7 +54,6 @@ -
@@ -84,6 +83,8 @@
+ +

Authorized signature

From e5c1bf06a2ac350adf42eecfb3505d5633a5c319 Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Thu, 24 Apr 2014 16:20:05 +0530 Subject: [PATCH 18/27] [imp]:remove br or text-center class then improve h2 or p tag bzr revid: ssh@tinyerp.com-20140424105005-bcg7ynx571h25w3w --- .../view/report_hr_yearly_salary_detail.xml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml index 13383817889..cc827bd6555 100644 --- a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml @@ -6,12 +6,10 @@
-
-
From +

+

From - To -

-
+ To

From 1e81e20cca31baffc487c32cb0f677888f2c260c Mon Sep 17 00:00:00 2001 From: "Sunil Sharma (OpenERP)" Date: Thu, 24 Apr 2014 17:32:02 +0530 Subject: [PATCH 19/27] [IMP]: Change function condition. bzr revid: atp@tinyerp.com-20140424120202-jqbkr72y1a43dbpf --- .../view/report_hr_yearly_salary_detail.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml index cc827bd6555..ce148d5fbf9 100644 --- a/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/view/report_hr_yearly_salary_detail.xml @@ -10,7 +10,7 @@

From To

-
Employee Code
+
-
Employee Code @@ -18,7 +18,6 @@ Department @@ -73,7 +72,7 @@
- + @@ -88,7 +87,6 @@ - From e2aa0707bb075052b0dfa6b843885e73d9fe6692 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Fri, 25 Apr 2014 09:46:41 +0530 Subject: [PATCH 20/27] [FIX]: ADD formatLang function in date field. use h2 tag in report title. bzr revid: atp@tinyerp.com-20140425041641-vk95pdxb8w3034ij --- .../views/report_hr_yearly_salary_detail.xml | 8 +++----- .../l10n_in_hr_payroll/views/report_hrsalarybymonth.xml | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml index ce148d5fbf9..91d93c3b73f 100644 --- a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml @@ -8,8 +8,8 @@

From - - To

+ + To

Total
Allowances with Basic:
@@ -102,8 +102,7 @@ - - + @@ -111,7 +110,6 @@ -
Employee Code
Deductions:
diff --git a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml index 57fadad5865..2f1f2ac8a9d 100644 --- a/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml +++ b/addons/l10n_in_hr_payroll/views/report_hrsalarybymonth.xml @@ -6,8 +6,8 @@
-

Yearly Salary Details

-

+

Yearly Salary Details

+

From To of Category

From be912b1d4622e541a6043c8ddf6dd4cabe3cd086 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Fri, 25 Apr 2014 09:51:48 +0530 Subject: [PATCH 21/27] [FIX]: Add qweb xml into openerp.py file bzr revid: atp@tinyerp.com-20140425042148-jkldr55vvxfrxnmy --- addons/l10n_in_hr_payroll/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_in_hr_payroll/__openerp__.py b/addons/l10n_in_hr_payroll/__openerp__.py index 61c4e11edaa..122ff26243c 100644 --- a/addons/l10n_in_hr_payroll/__openerp__.py +++ b/addons/l10n_in_hr_payroll/__openerp__.py @@ -55,7 +55,7 @@ Indian Payroll Salary Rules. 'wizard/hr_yearly_salary_detail_view.xml', 'report/payment_advice_report_view.xml', 'report/payslip_report_view.xml', - 'view/report_hr_yearly_salary_detail.xml', + 'views/report_hr_yearly_salary_detail.xml', ], 'test': [ From 1fadb254d5cd404996e11a8abc249b32a8e3bc98 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Fri, 25 Apr 2014 13:07:19 +0530 Subject: [PATCH 22/27] [FIX]: Fix months count in yearly salary details bzr revid: atp@tinyerp.com-20140425073719-7nlk18wuoxx3s39o --- .../views/report_hr_yearly_salary_detail.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml index 91d93c3b73f..c231587ab77 100644 --- a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml @@ -3,9 +3,9 @@ From 18de18a29e37f084c000206e138aaeddf9bc62ac Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Fri, 25 Apr 2014 18:34:57 +0530 Subject: [PATCH 23/27] [imp]:improve hr yearly salary detail tbody code bzr revid: ssh@tinyerp.com-20140425130457-rh9fxo703956eyqx --- .../views/report_hr_yearly_salary_detail.xml | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml index c231587ab77..4c7f41c3bde 100644 --- a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml @@ -87,30 +87,35 @@
Total
Allowances with Basic:
Deductions:
From d75153f990f45ef6639637139bccef77a4a8a7ce Mon Sep 17 00:00:00 2001 From: Sunil Sharma Date: Fri, 25 Apr 2014 18:39:34 +0530 Subject: [PATCH 24/27] [imp]:improve title for allowances with basic bzr revid: ssh@tinyerp.com-20140425130934-y3oho46frq1ss4p4 --- .../l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml index 4c7f41c3bde..bf9de12125e 100644 --- a/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml +++ b/addons/l10n_in_hr_payroll/views/report_hr_yearly_salary_detail.xml @@ -88,6 +88,7 @@
Allowances with Basic:
- [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] - - - - - - - - -
- To, - The Manager - - - - -
- [[ o.bank_id.name ]] Bank - - - - -
- - - - Dear Sir/Madam, - - - - -
- Payment Advice from [[ o.name ]] A/C no. [[ o.company_id.bank_ids and o.company_id.bank_ids[0].acc_number ]] form period [[ get_month(o.date)['from_name'] ]] to [[ get_month(o.date)['to_name'] ]] -
- [[ o.note ]] -
- SI. No. - - Name of the Employe - - Bank Account No. - - By Salary - - C/D -
- - . - - - - [[ line['name'] ]] - - [[ line['acc_no'] ]] - - [[formatLang(line['bysal'], currency_obj = company.currency_id) ]] - - [[ line['debit_credit'] ]] -
- SI. No. - - Name of the Employe - - Bank Account No. - - IFSC Code - - By Salary - - C/D -
- - . - - - [[ line['name'] ]] - - [[ line['acc_no'] ]] - - [[ line['ifsc_code'] ]] - - [[formatLang(line['bysal'], currency_obj = company.currency_id) ]] - - [[ line['debit_credit'] ]] -
- - - - - - - - - Total : [[ o.line_ids==[] and removeParentNode('para') ]] - - - [[ o.line_ids==[] and removeParentNode('para') ]][[ formatLang(get_bysal_total(), currency_obj = company.currency_id) ]] - - - - -
- - - - - - - - - Total : [[ o.line_ids==[] and removeParentNode('para') ]] - - - [[ o.line_ids==[] and removeParentNode('para') ]][[ formatLang(get_bysal_total(), currency_obj = company.currency_id) ]] - - - - -
- Yours Sincerely - - - - -
- For [[ company.name ]] - - - - -
- - - - - - - -
- - - - - - - -
- Authorized Signature - - - - -