Employee on one Stage for each Job Position independently

Miguel Da Silva

In this problem 3 models are involved: Freelancer, Job Position, Stage. The Freelancer model is similar to an Employee on Odoo. The Job Position model is similar to Job Position on HR Recruitment on Odoo and the Stage model is the same Stage on HR Recruitment module. 

The problem is that they have a fairly complex relation between them. 

The relation between Freelancer and Job Position is a Many2many. But the problem is when I want to set the relation for the stages. Now one Freelancer can be on the recruitment process of many Job Positions, and in every Job Position he would be in a different stage.

So if I create a Many2one Stage field on Freelancer, then the freelancer would be on the same stage for the recruitment process of all Job Positions that he applied, and that's not what I want. 

Instead, if I create a Many2one Stage field on the Job Position, then every freelancer that applied to this job would be on the same stage of the recruitment proccess, and that's also not what I want. 

I want the freelancer to be on one stage just for each Job Position independently.

What would be a solution for that? create another model called FreelancerJob? and what would be the relation between the models? 

At the end, I would like to have one Kanban view for each Job Position to group the Freelancers based on Stage that they are on the selected Job Position. For this I must use the "default_group_by" attribute on the XML. But there is also a problem related to that: It doesn't support related fields.

I am using Odoo 14 enterprise.