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

[17.0] [MIG] web_ir_actions_act_multi #2704

Open
wants to merge 26 commits into
base: 17.0
Choose a base branch
from

Conversation

augusto-weiss
Copy link

No description provided.

@augusto-weiss augusto-weiss mentioned this pull request Dec 27, 2023
26 tasks
@augusto-weiss augusto-weiss force-pushed the 17.0-mig-web_ir_actions_act_multi branch from 51a3825 to f4bab88 Compare January 3, 2024 13:39
@pedrobaeza
Copy link
Member

/ocabot migration web_ir_actions_act_multi

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Jan 3, 2024
@lbisiach
Copy link

@augusto-weiss are you close to merge this pr ?

@augusto-weiss
Copy link
Author

augusto-weiss commented Sep 30, 2024

Hi @lbisiach, sorry i lost the notification... this pr must have review

Ivorra78 and others added 4 commits September 30, 2024 16:22
@augusto-weiss augusto-weiss force-pushed the 17.0-mig-web_ir_actions_act_multi branch 2 times, most recently from 9db8993 to de306e7 Compare September 30, 2024 19:29
@augusto-weiss
Copy link
Author

augusto-weiss commented Sep 30, 2024

@chienandalu i update the table name, so now it's posible to uninstall the module without have a crashed db

_inherit = "ir.actions.actions"
_table = "ir_actions"
_table = "ir_actions_act_multi"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but this change very likely needs migration scripts, so that upgrading from Odoo 16, data is correctly separated and cleaned up from the ir_actions table and added to ir_actions_act_multi accordingly.

@augusto-weiss augusto-weiss force-pushed the 17.0-mig-web_ir_actions_act_multi branch from de306e7 to 088ddad Compare September 30, 2024 22:00
Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal of using the same table is to avoid populating too many relations for models that aren't used that much (if any)

To avoid deleting that system relation you could override the _drop_table method and to ignore it when the model table is that one of the system.

https://github.com/odoo/odoo/blob/88d0d1e15b7f3efeab39017512585248fd8c1d94/odoo/addons/base/models/ir_model.py#L293-L313

Another option is to make the model an abstract one, although that would avoid that you could declare those actions as data (which maybe isn't done anyway...)

@augusto-weiss
Copy link
Author

augusto-weiss commented Oct 3, 2024

@chienandalu IMO make the model Abstract is a better option... i am not sure about a case where users want to declare data

@chienandalu
Copy link
Member

chienandalu commented Oct 4, 2024

IMO make the model Abstract is a better option... i am not sure about a case where users want to declare data

I think so, but in any case, I think a migration script should be made to avoid dropping the table when the ir.model gets unlinked. I think OU handles this with its non destructive policy but maybe in other contexts it isn't

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

Successfully merging this pull request may close these issues.