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
…
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%