Merge lp:~openerp-dev/openobject-addons/6.0-opw-587811-skh into lp:openobject-addons/6.0

Proposed by Somesh Khare
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-587811-skh
Merge into: lp:openobject-addons/6.0
Diff against target: 30 lines (+5/-4)
1 file modified
hr_payroll/hr_payroll.py (+5/-4)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-587811-skh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+153290@code.launchpad.net

Description of the change

Hello Sir,

[FIX]hr_payroll: Leaves are deducted twice when computing the payslip.

Steps:
1. install hr_payroll_account and hr_payroll module.
2. Create Contract for employee "Quentin Paolino" and select salary structure as "Marketing Executive".
3. On leave type "Casual Leave" in Payroll Configuration select payment: Un-Paid Holiday, Payroll Head: Leave without pay
4. create leave request for 2 days and approve it.
5. Open/Create Employee Payslip for employee "Quentin Paolino" and press button "Compute sheet" check total Payment it is calculated wrong. Deduction of leave are twice, 1. From the Basic salary 2. from the Gross Salary - deduction.

In current scenario HRA is calculated after the leave deduction(as per as my understanding which should be on basic only not after deduction) and then the rest calculation, once the gross salary calculated then again leaves+deduction(eg:PF,PT etc) calculated, Result: Total salary is calculated wrong.

This branch fixes this issue. Kindly review the branch and please share your views on it.

Thanks & Regards,
Somesh Khare

To post a comment you must log in.

Unmerged revisions

5452. By Somesh Khare

[FIX]hr_payroll: Leaves are deducted twice when computing the payslip (Case:Ref 587811)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_payroll/hr_payroll.py'
2--- hr_payroll/hr_payroll.py 2011-08-05 07:46:37 +0000
3+++ hr_payroll/hr_payroll.py 2013-03-14 06:56:23 +0000
4@@ -819,10 +819,11 @@
5 register_pool = self.pool.get('company.contribution')
6 res = {}
7 for rs in self.browse(cr, uid, ids, context=context):
8+ basic = rs.contract_id and rs.contract_id.wage or rs.basic
9 allow = 0.0
10 deduct = 0.0
11 others = 0.0
12- obj = {'basic':rs.basic}
13+ obj = {'basic':basic}
14 if rs.igross > 0:
15 obj['gross'] = rs.igross
16 if rs.inet > 0:
17@@ -863,10 +864,10 @@
18 record = {
19 'allounce':allow,
20 'deduction':deduct,
21- 'grows':rs.basic + allow,
22- 'net':rs.basic + allow - deduct,
23+ 'grows':basic + allow,
24+ 'net':basic + allow - deduct,
25 'other_pay':others,
26- 'total_pay':rs.basic + allow - deduct
27+ 'total_pay':basic + allow - deduct
28 }
29 res[rs.id] = record
30 return res