if employee.country_id.name == 'Saudi Arabia':
result = (contract.wage + (contract.wage * 0.10)) * 0.12
else:
result = (contract.wage + (contract.wage * 0.10)) * 0.02
Odoo version 10
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
if employee.country_id.name == 'Saudi Arabia':
result = (contract.wage + (contract.wage * 0.10)) * 0.12
else:
result = (contract.wage + (contract.wage * 0.10)) * 0.02
Odoo version 10
you have wrong indentation in the else statement , try the following code instead
if employee.country_id.name == 'Saudi Arabia':
result = (contract.wage + (contract.wage * 0.10)) * 0.12
else:
result = (contract.wage + (contract.wage * 0.10)) * 0.02
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up