コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3620 ビュー

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

アバター
破棄