Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question : move model to another module #101

Open
rousseldenis opened this issue Apr 19, 2018 · 2 comments
Open

Question : move model to another module #101

rousseldenis opened this issue Apr 19, 2018 · 2 comments

Comments

@rousseldenis
Copy link
Contributor

I want to split some models definition in different new modules.

I don't find any openupgrade function that allows to move a model to another module. I think there is an entry in ir_model_data that associates model and module. Is the entry deleted on new module install?

Maybe there is nothing to do... Is there anybody faced the same situation

@StefanRijnhart
Copy link
Member

I don't think we cover this case. @hbrunn fixed this for field entries though: https://github.com/OCA/OpenUpgrade/blob/11.0/odoo/addons/base/ir/ir_model.py#L761-L800 (in odoo/models.py in earlier versions). Maybe we need something similar for models indeed.

@pedrobaeza
Copy link
Member

We only have the update_module_names, but it's for whole models of the module. You can take the code from this function for applying specific things for a model and create a new function update_model_module or similar name and factor out this code to be called isolate or from the update_module_names function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants