[IMP] hr_payroll: Improve the contribution register report so it will now show the lines of confirmed payslips only

bzr revid: psi@tinyerp.co.in-20110629092032-2uq3i90evylxy8zu
This commit is contained in:
psi (Open ERP)
2011-06-29 14:50:32 +05:30
parent 0600e1334b
commit 82b0249a9d
@@ -54,6 +54,7 @@ class contribution_register_report(report_sxw.rml_parse):
"LEFT JOIN hr_payslip AS hp on (pl.slip_id = hp.id) "\
"WHERE (hp.date_from >= %s) AND (hp.date_to <= %s) "\
"AND pl.register_id = %s "\
"AND hp.state = 'done' "\
"ORDER BY pl.slip_id, pl.sequence",
(self.date_from, self.date_to, obj.id))
payslip_lines = [x[0] for x in self.cr.fetchall()]