From 81a66b9d3975d15a3578efaab64d76ae2b637682 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 11 Apr 2011 17:06:37 +0530 Subject: [PATCH] [FIX] payroll: grouping of details by salayr head AND domain is not applied on first tab of payslip, we should see there only the payslip lines with appears_on_payslip = True bzr revid: mra@mra-laptop-20110411113637-qfnxuylu1icn6889 --- addons/hr_payroll/hr_payroll.py | 2 +- addons/hr_payroll/hr_payroll_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index 44c0b365c7a..7a59a3fd93a 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -352,7 +352,7 @@ class hr_payslip(osv.osv): else: #if we don't give the contract, then the rules to apply should be for all current contracts of the employee contract_ids = self.get_contract(cr, uid, payslip.employee_id, payslip.date_from, payslip.date_to, context=context) - lines = [(0,0,line) for line in self.pool.get('hr.payslip').get_payslip_lines(cr, uid, contract_ids, payslip.id, context=context)] + lines = [(0,0,line) for line in self.pool.get('hr.payslip').get_payslip_lines(cr, uid, contract_ids, payslip.id, context=context) if line['appears_on_payslip']] self.write(cr, uid, [payslip.id], {'line_ids': lines}, context=context) return True diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml index 8c4929e7713..73d5b11ac88 100644 --- a/addons/hr_payroll/hr_payroll_view.xml +++ b/addons/hr_payroll/hr_payroll_view.xml @@ -237,7 +237,7 @@ - +