odoo/upgrade-util#418
Created by Sanchit Gupta (sagu)
Blocked
- Merge method
- Review
-
CI
- ci/runbot: Test upgrades between stable versions
- ci/upgrade_enterprise: Test upgrades for enterprise master
- label
- odoo-dev:master-fix-custom-field-manaul-sagu
- head
- 762aa33485c058342e464be216aa8b9a5e36cfa4
| odoo/upgrade-util | |
|---|---|
| master | #418 missing r+ |
[FIX] util/orm: don't mark inherited field manual for custom
During the upgrade process, inherited fields were incorrectly marked as manual, whereas they should retain their original base state.
like Fields created through Studio or ir.model.fields are expected to have state = manual, while inherited fields are set up by the ORM with state = base 1.
Marking inherited fields as manual makes the ORM treat them as independently created fields, which can trigger unnecessary computations, e.g for non-stored fields and
Many2many fields related to ir.attachment.
This change ensures that:
* inherited fields retain state = base
* only fields created from ir.model.fields or coming from custom module will have the state manual not the inherited one.
* field setup remains consistent with the ORM behavior
This prevents inherited fields from being treated as independent fields and avoids unwanted computations during mock crawl without marking as inhertied field.