i'm using odoo 11 and i want to create a salary rule to calculate legal leaves in payslip if they existe . i create a rule
try:
result = (contract.wage /26) * worked_days.Leaves2019.number_of_days
except:
result = False
and it shows 0 if the employee doesn't has a legal leave. The problem is that i want to show only this rule in the payslip when the employee has a legal leave and when he doesn't it will be hidden. Any idea to that? Any help please ? How could i modify my rule to satisfy my needs ?