Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3640 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ