Hello,
We recently moved from Odoo SaaS to Odoo SH (v18.0).
We made a lot of customizations either with Studio or manually (models and fields directly created in dev mode).
We want to move some of those models into proper modules so we can go further in customization.
I found this comment in Odoo Forum (https://www.odoo.com/fr_FR/forum/aide-1/migrating-odoo-studio-fields-to-a-custom-module-287357#answer-287426).
This works fine for a custom field in a non-custom model.
The field's state is changed from "manual" to "base".
But what about a custom model?
How one can move a custom model created manually in Odoo interface (ie. "x_model") to a custom module?
class Model(models.Model):
_name = "x_model"
x_name = fields.Char('Name', required=True)^ this code does nothing. Model's and field's states remain "manual".
And a new field added in the module is not created in Odoo after update (no error in logs).
class Model(models.Model):
_inherit = "x_model"
x_name = fields.Char('Name', required=True)^ this code generate the following error :
TypeError: Model 'x_model' does not exist in registry.