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

Add a way to prevent conflicting modules to be activated #634

Open
celinenilla opened this issue Oct 21, 2024 · 5 comments · May be fixed by #644
Open

Add a way to prevent conflicting modules to be activated #634

celinenilla opened this issue Oct 21, 2024 · 5 comments · May be fixed by #644
Assignees

Comments

@celinenilla
Copy link

Conflicting modules, such as spp_base (SP-MIS) and spp_farmer_base (Farmer Registry), can be activated by the admin user via the Odoo "Apps" UI. This could lead to errors due to conflicts between the modules. To prevent these issues, a pre_init_hook should be implemented in each conflicting module. The hook will contain a function that checks for the presence of the other conflicting module and prevents activation if it's already installed.

An alternative for this is to use "excludes" in manifest.py.

@celinenilla
Copy link
Author

@kneckinator , can you please help advise on which of the two alternatives above we should pick?

@gonzalesedwin1123 gonzalesedwin1123 changed the title Add 'pre_init_hook' in modules to prevent conflicting modules to be activated Add a way to prevent conflicting modules to be activated Oct 23, 2024
@kneckinator
Copy link
Contributor

@gonzalesedwin1123 suggested we try the excludes section in the manifest first, then explore the pre_init_hook if excludes does not give us the expected results. I agree with that suggestion.

@gonzalesedwin1123
Copy link
Member

@kneckinator @celinenilla after trying the excludes section in the manifest, I discovered that it is doing what is needed.

@gonzalesedwin1123
Copy link
Member

I have completed this. Installing conflicting modules will display this:
Image

@jannahadlaon
Copy link

jannahadlaon commented Nov 8, 2024

Findings: Return to devs - testing Blocked
Installing the modules below raised errors
spp_change_request_add_children_demo
spp_change_request_add_farmer

STEPS:
1.
Install spp_base then install spp_farmer_registry_base - PASS
Error message should popup
image

Install spp_farmer_registry_base then install spp_base - PASS
image

Install spp_change_request_add_children_demo then install spp_farmer_registry_base - FAIL
Error occurred when installing spp_change_request_add_children_demo
image

Install spp_farmer_registry_base then install spp_change_request_add_children_demo - PASS
image

  1. Installing spp_change_request_add_farmer conflicts with spp_base - FAIL
    Error occurred when installing spp_change_request_add_farmer
    image

Installing spp_base conflicts with spp_change_request_add_farmer - PASS
image

  1. Installing spp_farmer_registry_default_ui conflicts with spp_base - PASS
    image
    Installing spp_base conflicts with spp_farmer_registry_default_ui- PASS
    image

  2. Installing spp_farmer_registry_demo conflicts with spp_base - PASS
    image

Installing spp_base conflicts with spp_base spp_farmer_registry_demo- PASS
image

@gonzalesedwin1123 @emjay0921

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 a pull request may close this issue.

4 participants