Odoo Help

0
0
Avatar

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
4282
| 5 5 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
On 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== "
female"):
  result = 2

how i can set date in condition change gender with date

ahmad safi
on 3/2/15, 3:59 AM

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Odoo Training Center

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

Test it now

Question tools

1 follower(s)

Stats

Asked: 1/29/15, 7:05 AM
Seen: 2081 times
Last updated: 3/16/15, 8:10 AM