'Override of the base.stage method
Parameter of the stage search taken from the issue:
- project_id: if set, stages must belong to this project or
be a default case'

def stage_find(self, project_id, domain=None, order='sequence'):

    search_domain = (list(domain) if domain else [])
    if project_id:
        search_domain += [('project_ids', '=', project_id)]
    project_task_type = self.env['project.task.type'].search(search_domain, order=order, limit=1)
    return project_task_type.id
