From b7e50727cc49679a43a05f37e32da20b1564ef72 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Tue, 7 Aug 2012 18:59:05 +0530 Subject: [PATCH] [IMP]l10n_in_hr_payroll:code improved bzr revid: kbh@tinyerp.com-20120807132905-9cz330v0fmjzyjuq --- .../report/report_hr_yearly_salary_detail.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 9b4dfbebc46..1e0b38101fc 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 @@ -77,6 +77,7 @@ class employees_yearly_salary_report(report_sxw.rml_parse): self.total = 0.00 lines = [] + flag = False lines = self.cal_monthly_amt(form, obj.id) if lines: for line in lines: @@ -93,11 +94,14 @@ class employees_yearly_salary_report(report_sxw.rml_parse): self.deduct_list.remove(line[0]) if line: if line[0][0] == "Gross": + flag = True gross = line[0] if line[0][0] == "Net": + flag = True net = line[0] - self.allow_list.append(gross) - self.deduct_list.append(net) + if flag: + self.allow_list.append(gross) + self.deduct_list.append(net) return None def cal_monthly_amt(self, form, emp_id):