Skip to Content
Menu
This question has been flagged
1132 Views

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



Avatar
Discard
Related Posts Replies Views Activity
3
Oct 23
5973
1
Sep 23
1962
1
May 23
1000
2
Apr 23
1374
1
Mar 23
996