Search in the view of employees by the country field
I need in the Employee module to perform a search for a field in a table that has the following relationship:
class AiHrEmployee (models.Model):
_inherit = ['hr.employee']
collaborations_ids = fields.One2many ('hr.employee.collaboration.line', 'employee_id', "Collaboration activities")
class AiCollaborationActivityLine (models.Model):
_name = "hr.employee.collaboration.line"
employee_id = fields.Many2one ('hr.employee', 'Employee')
country_id = fields.Many2one ('res.country', 'Place of collaboration')
activity = fields.Char (string = "Activity of collaboration", size = 80)
time = fields.Integer (string = "Time", help = "Time of collaboration")
_name = "res.country"
name = fields.Char ()
In the Employee view I want to do the search to show all the employees that have had collaboration in a certain country (country) that I enter.
Add Custom Filter
I work with Odoo 11.0
I would appreciate any help in this respect.
Thanks you for advance!