In Openerp there are attendances which are imported for each employee. So, what we need is when we are generating payslips.
So, each payslip has salary structure and in every salary structure there are salary rules.
[For Eg: A Payslip has a salary rule i.e. Conveyance Allowance. So, the calculation of conveyance allowance goes like this:
[1250*(No. of days worked/ total days in a month)
So, the no of days will come from the attendance of a person. the days he was present for that particular month. the month for which payslip is being generated.
Lets say as user selects 01-04-2014 to 30-04-2014 in payslip and selects a particular employee. so automatically the attendance of that employee should come and then accordingly the salary rule will take that attendance from the input.