i created i module that has as a field manager, i want to be filled automatically with the value of the parent_id field of the hr.employee
how i can do this ?
i tried this way but i don't know how to point to the parent_id field
class Job_Certification(models.Model):
_name = 'job.certification'
manager = fields.Many2one(
'hr.employee',
'manager',
default=lambda self: self.env['hr.employee']._company_default_get('my_module_name')
)
Other module method can call same way, self.env['hr.employee']._company_default_get()
Did you find an answer to this?