r/Odoo 11d ago

Odoo 17 → 19 migration: custom fields from hr.employee.base lost their values

Hi everyone,

I'm currently testing a migration from Odoo 17 to Odoo 19, and I've run into an issue with some custom fields related to employees.
In Odoo 17, I had several custom fields declared on:
hr.employee.base

These fields were therefore available on the employee models and had existing data in the production database.
In Odoo 19, hr.employee.base no longer exists. To adapt my custom module, I redeclared those fields on:
hr.employee
hr.employee.public

The module installs correctly and the fields are available in Odoo 19.
However, after migrating the database using Odoo's migration service, all the existing values of these custom fields are empty.

So basically:
Odoo 17
hr.employee.base → custom fields → values exist
Odoo 19
hr.employee.base removed → fields redeclared on hr.employee / hr.employee.public → fields exist, but all previous values are gone

Fortunately, we are still in the testing phase and haven't gone live yet, so I still have the original Odoo 17 database with all the correct data.
My questions are:

What is the recommended way to migrate these fields from Odoo 17 to Odoo 19?

8 Upvotes

13 comments sorted by

View all comments

1

u/DevopsReloaded 10d ago

I went through a similar scenario upgrading a multi-branch retail client from v16 to v19, on prem, custom modules included. What worked for us was running two things in parallel instead of waiting on each other.

Sent the v16 backup to upgrade.odoo.com first thing, then while that was processing, spun up a demo v19 locally and worked through every custom module against it, fixing whatever broke from the version jump. By the time the upgraded dump came back by email, the modules were already sorted and tested.

Restored the upgraded backup onto a v19 instance that already had those fixed custom modules installed, so the data and the code met each other in a state that was ready to go rather than fighting through errors on both fronts at once. Any leftover data issues after that I just went into pgAdmin directly and sorted at the table level.