OCA / project

Odoo Project Management and Services Company Addons
https://odoo-community.org/psc-teams/project-service-28
GNU Affero General Public License v3.0
275 stars 775 forks source link

[15.0][FIX] project_hr: remove unnecessary migration causing errors #1308

Closed aleuffre closed 2 months ago

aleuffre commented 2 months ago

The field employee_ids of project.task is computed. So, during the regular upgrade process, the m2m relation is populated by the compute method.

When executing the post-migration 1) the m2m relation has already been populated 2) the migration script causes errors of the type:

psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "hr_employee_project_task_rel_pkey"
DETAIL:  Key (project_task_id, hr_employee_id)=(1, 1) already exists.
OCA-git-bot commented 2 months ago

Hi @pedrobaeza, some modules you are maintaining are being modified, check this out!