Skip to content
Snippets Groups Projects
Commit 8bce129a authored by Thomas Lefebvre (thle)'s avatar Thomas Lefebvre (thle)
Browse files

[FIX] hr_recruitment: correct count in mutli-company context


Steps to reproduce:
-------------------
- create a job position without specifying the company;
- being in the first company, create an application for this job position;
- being in the second company, create an other application;
- go to the job position kanban view;

Issue:
------
Despite the selected company, the count for this job application is still two.

Solution:
---------
Include the allowed companies in the query to count the number of applicants.

opw-3453348

closes odoo/odoo#133033

Signed-off-by: default avatarSofie Gvaladze (sgv) <sgv@odoo.com>
parent 5cc7d5e5
Branches
Tags
No related merge requests found
......@@ -126,8 +126,9 @@ class Job(models.Model):
ON s.job_id = a.job_id
AND a.stage_id = s.stage_id
AND a.active IS TRUE
WHERE a.company_id in %s
GROUP BY s.job_id
""", [tuple(self.ids), ]
""", [tuple(self.ids), tuple(self.env.companies.ids)]
)
new_applicant_count = dict(self.env.cr.fetchall())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment