Skip to content

Commit

Permalink
Exclude payslip lines with null amount
Browse files Browse the repository at this point in the history
  • Loading branch information
dufresnedavid committed Feb 12, 2015
1 parent 4741f44 commit cecb24a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions hr_payroll_analysis/hr_payslip.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def compute_analysis_lines(self, cr, uid, ids, context=None):
required_lines = [
line for line in payslip.details_by_salary_rule_category
if line.salary_rule_id.include_in_payroll_analysis
and line.total
]

is_refund = payslip.credit_note
Expand Down
3 changes: 1 addition & 2 deletions hr_payroll_analysis/hr_salary_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ def refresh_analysis_lines(self, cr, uid, ids, context=None):
cr, uid, [('salary_rule_id', '=', rule.id)],
context=context)

print line_ids

analysis_line_obj.unlink(cr, uid, line_ids, context=context)

if rule.include_in_payroll_analysis:
Expand All @@ -65,6 +63,7 @@ def refresh_analysis_lines(self, cr, uid, ids, context=None):
cr, uid, [
('salary_rule_id', '=', rule.id),
('slip_id.state', 'not in', ['draft', 'cancel']),
('total', '!=', 0),
], context=context)

for line in payslip_line_obj.browse(
Expand Down

0 comments on commit cecb24a

Please sign in to comment.