As far as I know - we can count the number of days the employee was at work using this code:
for line in payslip.worked_days_line_ids:
result += line.number_of_days
But i dont know how we can count the number of days off in this month. The idea is that we will use the weekend for payroll, but at a different rate.
Do you have any ideas?