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] website: Revoke Portal Access changes company default public user #177737

Open
2 of 4 tasks
mjrk opened this issue Aug 23, 2024 · 0 comments
Open
2 of 4 tasks

[17.0] website: Revoke Portal Access changes company default public user #177737

mjrk opened this issue Aug 23, 2024 · 0 comments

Comments

@mjrk
Copy link
Contributor

mjrk commented Aug 23, 2024

Odoo Version

  • 15.0
  • 16.0
  • 17.0
  • Other (specify)

Steps to Reproduce

  • For any contact without login, Grant Portal Access and revoke it again
  • Create a new Website

The New website will have the user, you revoked portal access for, as "public user". This can cause a lot (really a lot) of issues later, because this user might not properly set up to be a public user of a new website, it will have email address and other values set, leading to difficult to find follow-up errors, especially with custom modules that expect a correct setup.

Technical Details:

Please note, that the _get_public_user-method is used in multiple custom modules, that we sometimes use. For example, to calculate the public pricelist for a company, but there are more. All of them break after we revoke portal access of a user, because this changes the default public user of our company in the _get_public_user-method.

I'm not sure about your desired solution. In our opinion, the revoke_portal_access is just wrong: It should not assign the user to group public.
We tested this:

  • modify addons/portal/wizard/portal_wizard.py, so that users are just archived, but not assigned to public group, and with a small adaption of _compute_group_details it all worked out fine. Issue solved.

Before we provide a pull request, we would like to get feedback if our approach points in the right direction to fix this issue. Then we will provide a PR with tests.

Thanks in advance!

Log Output

No response

Support Ticket

No response

@mjrk mjrk changed the title [17.0] website: Revoke Access changes company public user [17.0] website: Revoke Portal Access changes company default public user Aug 23, 2024
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

1 participant