Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
3623 Vistas

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

Avatar
Descartar
Mejor respuesta

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

Avatar
Descartar