revivenote revivenote - 1 year ago 106
Python Question

Odoo 9 Salary Rule based on country

I am trying to define a salary rule in Odoo 9 Payroll.

The rule condition has to be based on the employee's country. I tried the python expression code below but it does not work.

result = (employee.country_id=="Malaysia") or False

I'm aware that the field type of employee's country (nationality) is
with relation of
. I just couldn't figure out how it works.

Answer Source

This should work:

result = ( == "Malaysia") or False
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download