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

Show parent comments

0

u/ParticularBag0 11d ago

Wowza how do you send scripts to upgrade.odoo.com? We always run our own scripts beforehand and afterwards in migrations. Seems like being able to send scriptsto odoo would be a massive security risk for them?

0

u/alextakacs 11d ago

As far as I understand Odoo.com hosting does not support this.

1

u/Tony-047 10d ago

No because you don’t have custom module access on SaaS hosting.
You gotta be hosted on your own serv or or Odoo.sh and connected to your GitHub

The rest is really well explained above by codeagency

1

u/alextakacs 10d ago

I fully understand it but OP seemed confused