跳至内容
菜单
此问题已终结
1 回复
3630 查看

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

形象
丢弃