Leave Deduction twice in Payroll module

Asked by Ankit Srivastava

I am using the Openerp server 6.0.2.
Here is the error which i am getting while computing the salary slip
"Payroll head is missing" and when i configure the Casual Leave salary head type then it computes the salary with leaves deducted two times, one for "Leave Deductions" and second for "Deductions"

Help me out

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Ankit Srivastava (ankitsrivastava2000) said :
#2

Still couldn't find the answer

Revision history for this message
Ankit Srivastava (ankitsrivastava2000) said :
#3

Also check this URL - http://www.openerp.com/forum/topic31077.html

Is this any kind of bug in OpenERP 6.0.2

Revision history for this message
Kalpana Hemnani(SerpentCS) (khemnani-serpentcs) said :
#4

Hello Ankit Srivastava,

Accept greetings from Serpent Consulting Services.

We have investigated your issue and found the bug in openerp payroll module.
Here with I attach a patch that will fix the issue.

Please verify this patch and give your feedback. I have posted a bug report and propose patch to OpenERP as well.

Regards,
SerpentCS

=== modified file 'hr_payroll/hr_payroll.py'
--- hr_payroll/hr_payroll.py 2011-08-05 07:46:37 +0000
+++ hr_payroll/hr_payroll.py 2012-05-12 10:06:09 +0000
@@ -1257,11 +1257,11 @@
                     res['amount'] = perday * (days/2)
                     total += perday * (days/2)
                     leave += days / 2
- res['type'] = 'deduction'
+ res['type'] = hday.holiday_status_id.head_id.type
                 else:
                     res['name'] = hday.holiday_status_id.name + '-%s' % (days)
                     res['amount'] = perday * days
- res['type'] = 'deduction'
+ res['type'] = hday.holiday_status_id.head_id.type
                     leave += days
                     total += perday * days

Can you help with this problem?

Provide an answer of your own, or ask Ankit Srivastava for more information if necessary.

To post a message you must log in.