Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
3626 Näkymät

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
Hylkää
Paras vastaus

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
Hylkää