
from openerp import models, fields

GENDER_SELECTION = [('m', 'M'),
                    ('f', 'F')]


class HrChildren(models.Model):
    _name = 'hr.employee.children'
    _description = 'HR Employee Children'

    name = fields.Char("Name", required=True)
    date_of_birth = fields.Date("Date of Birth", oldname='dob')
    employee_id = fields.Many2one('hr.employee', "Employee")
    gender = fields.Selection(selection=GENDER_SELECTION, string='Gender')


from openerp import models, fields

GENDER_SELECTION = [('male', 'Male'),
                    ('female', 'Female')]


class HrChildren(models.Model):
    _name = 'hr.employee.children'
    _description = 'HR Employee Children'

    name = fields.Char("Name", required=True)
    date_of_birth = fields.Date("Date of Birth", oldname='dob')
    employee_id = fields.Many2one('hr.employee', "Employee")
    gender = fields.Selection(selection=GENDER_SELECTION, string='Gender')

Use the same selection like employee
[IMP][hr_family] Use the same selection like employee

  
  from openerp import models, fields
  
- GENDER_SELECTION = [('m', 'M'),
+ GENDER_SELECTION = [('male', 'Male'),
-                     ('f', 'F')]
+                     ('female', 'Female')]
  
  
  class HrChildren(models.Model):
      _name = 'hr.employee.children'
      _description = 'HR Employee Children'
  
      name = fields.Char("Name", required=True)
      date_of_birth = fields.Date("Date of Birth", oldname='dob')
      employee_id = fields.Many2one('hr.employee', "Employee")
      gender = fields.Selection(selection=GENDER_SELECTION, string='Gender')
  
Use the same selection like employee
## Code Before:

from openerp import models, fields

GENDER_SELECTION = [('m', 'M'),
                    ('f', 'F')]


class HrChildren(models.Model):
    _name = 'hr.employee.children'
    _description = 'HR Employee Children'

    name = fields.Char("Name", required=True)
    date_of_birth = fields.Date("Date of Birth", oldname='dob')
    employee_id = fields.Many2one('hr.employee', "Employee")
    gender = fields.Selection(selection=GENDER_SELECTION, string='Gender')

## Instruction:
Use the same selection like employee
## Code After:

from openerp import models, fields

GENDER_SELECTION = [('male', 'Male'),
                    ('female', 'Female')]


class HrChildren(models.Model):
    _name = 'hr.employee.children'
    _description = 'HR Employee Children'

    name = fields.Char("Name", required=True)
    date_of_birth = fields.Date("Date of Birth", oldname='dob')
    employee_id = fields.Many2one('hr.employee', "Employee")
    gender = fields.Selection(selection=GENDER_SELECTION, string='Gender')
