Odoo Help

1 Answer

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
| 5 6 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
1/29/15, 7:18 AM

In HR module, the gender field is defined as 
'gender': fields.selection([('male', 'Male'),('female', 'Female')], 'Gender'),

So, to check whether gender is male or female, we use the key instead of value to check any SELECTION.
if (employee.gender== "male"):
  result = 1
elif (employee.gender== "
  result = 2

1 Comment
ahmad safi
3/2/15, 3:59 AM

how i can set date in condition change gender with date

Ask a Question
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now