Files
odoo_source/addons/hr_recruitment
alsh-odoo 1bccc95bbd [FIX] hr_recruitment: passing ids instead of objects while creating an employee
This traceback arises when the user clicks the 'Create Employee' button
from 'recruitment'

To reproduce this issue:

1) Install 'hr_recruitment' and 'Website'
2) Open 'Recruitment' and click on the 'Job Page' button of any published
   'Job Position'.
3) Click on ' Apply Now ' and apply for that job.
4) Now open that job application from 'Recruitment/Application/By job positions'
5) Change the stage from 'New' to 'Contract Signed'.
6) A button 'Create Employee' will appear, click on that.

Error:- "psycopg2.ProgrammingError: can't adapt type 'res.country'" will appear.

On the 'create_employee_from_applicant' method, the employee record is created
by using '_get_employee_create_vals' method.

In that '_get_employee_create_vals' method, 'private_country_id' is created
from 'address_sudo.country_id' which is an object.

See:-
https://github.com/odoo/odoo/blob/a5911b7d560a4e259570cf9d46fff5fb286e3d62/addons/hr_recruitment/models/hr_applicant.py#L587-L605

Here in the above use-case instead of passing 'ID', an Object is passed.
Which leads to the above traceback.

Sentry-4450017781

closes odoo/odoo#136121

X-original-commit: e462e9891fa909b04a21aa7b11e8b8f26688cc04
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Altaf Shaik (alsh) <alsh@odoo.com>
2023-09-21 23:54:26 +00:00
..
2023-09-11 19:13:59 +00:00
…

Manage Recruitment and Job applications

Publish, promote and organize your job offers with the Odoo Open Source Recruitment Application.

Organize your job board, promote your job announces and keep track of application submissions easily. Follow every applicant and build up a database of skills and profiles with indexed documents.

Post Your Jobs on Best Job Boards

Connect automatically to most famous job board websites; linkedIn, Monster, Craigslist, ... Every job position has a new email address automatically assigned to route applications automatically to the right job position.

Whether applicants contact you by email or using an online form, you get all the data indexed automatically (resumes, motivation letter) and you can answer in just a click, reusing templates of answers.

Customize Your Recruitment Process

Use the kanban view and customize the steps of your recruitments process; pre-qualification, first interview, second interview, negociaiton, ...

Get accurate statistics on your recruitment pipeline. Get reports to compare the performance of your different investments on external job boards.

Streamline Your Recruitment Process

Follow applicants in your recruitment process with the smart kanban view. Save time by automating some communications with email templates.

Documents like resumes and motivation letters are indexed automatically, allowing you to easily find for specific skills and build up a database of profiles.