8000 [17.0] [MIG] web_ir_actions_act_multi by augusto-weiss · Pull Request #2704 · OCA/web · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[17.0] [MIG] web_ir_actions_act_multi #2704

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

Merged
merged 26 commits into from
Mar 26, 2025

Conversation

augusto-weiss
Copy link

No description provided.

@augusto-weiss augusto-weiss mentioned this pull request Dec 27, 2023
32 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

@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

@augusto-weiss
Copy link
Author

Hello everyone @chienandalu @gaikaz @lbisiach @pedrobaeza
I'm working on migration script for the issue . I pushed a new PR with a commit which fix it.
If you think its ok, i can include it here.
a01cfad
Let me know your opinions

Copy link
Contributor
@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

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

@augusto-weiss @chienandalu could you please update the status of this PR

@augusto-weiss
Copy link
Author
8000

Hi @carlos-lopez-tecnativa i'm waiting for some feedback.
Last changes could be:
a01cfad

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.

Hi @augusto-weiss sorry I had to grok the issue again 😅

Your option of using another table is safe enough, although at the cost of an extra table that won't be used. Not big deal anyway :)

Another option would be just using the model as abstract to avoid the uninstall problems, as that would ignore dropping the table: https://github.com/odoo/odoo/blob/88d0d1e15b7f3efeab39017512585248fd8c1d94/odoo/addons/base/models/ir_model.py#L297

And the third one to create an uninstall hook, which would probably kinda complex as we'd need to avoid dropping the table somehow...

So add your changes for the final review :)

@carlos-lopez-tecnativa
Copy link
Contributor

Hi @augusto-weiss sorry I had to grok the issue again 😅

Your option of using another table is safe enough, although at the cost of an extra table that won't be used. Not big deal anyway :)

Another option would be just using the model as abstract to avoid the uninstall problems, as that would ignore dropping the table: https://github.com/odoo/odoo/blob/88d0d1e15b7f3efeab39017512585248fd8c1d94/odoo/addons/base/models/ir_model.py#L297

And the third one to create an uninstall hook, which would probably kinda complex as we'd need to avoid dropping the table somehow...

So add your changes for the final review :)

ping @augusto-weiss

@augusto-weiss
Copy link
Author

Sorry @chienandalu i lost the notification! Thank @carlos-lopez-tecnativa for ping me

@carlos-lopez-tecnativa
Copy link
Contributor

@augusto-weiss please include #3119 and squash any additional administrative commits.

@carlos-lopez-tecnativa
Copy link
Contributor

@augusto-weiss please include #3119 and squash any additional administrative commits.

ping @augusto-weiss

1 similar comment
@carlos-lopez-tecnativa
Copy link
Contributor

@augusto-weiss please include #3119 and squash any additional administrative commits.

ping @augusto-weiss

OCA-git-bot and others added 18 commits March 26, 2025 09:03
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: web-16.0/web-16.0-web_ir_actions_act_multi
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_ir_actions_act_multi/
Currently translated at 100.0% (17 of 17 strings)

Translation: web-16.0/web-16.0-web_ir_actions_act_multi
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_ir_actions_act_multi/es/
Currently translated at 100.0% (17 of 17 strings)

Translation: web-16.0/web-16.0-web_ir_actions_act_multi
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_ir_actions_act_multi/it/
@augusto-weiss augusto-weiss force-pushed the 17.0-mig-web_ir_actions_act_multi branch from 088ddad to 1c42727 Compare March 26, 2025 12:06
@augusto-weiss
Copy link
Author

Hi @carlos-lopez-tecnativa thanks about that. I included it.
cc @chienandalu @gaikaz

Copy link
Contributor
@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

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

I expected that my commit would be included, keeping the original author—just do a cherry-pick. But anyway, LGTM.

CC @chienandalu @pedrobaeza, could you review this, please?

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 17.0-ocabot-merge-pr-2704-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit ceb5c33 into OCA:17.0 Mar 26, 2025
5 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 0e5e4bf. Thanks a lot for contributing to OCA. ❤️

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

Successfully merging this pull request may close these issues.

0