Hello,
I create new fields cashable in leave type and leave request models, cashable to allow selling the annual leave if the employee wants, I want to add this as an allowance in the payroll, I need the check first if the leave request is cashable or not.
when writing the python code for the salary rule I get the wrong python code.
here's my code:
if leave.cashable=true:
result=-((contract.wage/30)*(worked_days.Legal Leaves 2022 and worked_days.Legal Leaves 2022.number_of_days))or False
else:
result=0
Thank you for any help