Files
odoo_source/addons/website/models
Denis Ledoux 611eea839c [FIX] website: don't change public user of website when saving general settings
Before this revision, the public user of your website could be changed
upon saving the general settings if you added users in the public group.

Case:
- Install website
- Add a user in the "public" group,
with a login sorted alphabetically before "public", let's say "1public"
- Open the general settings and save directly
- Notice the public user of the website has been changed to "1public",
and it did not keep "public", while you haven't changed anything
in the settings.

That said, the current heuristic to find the public user of a company
might not be the best, as you could automatically find users in the group
public that you would not like to use as the public user of your website.

In master, maybe a field `public_user_id` could be added on
`res.company`, and the `user_id` of the website could become
a related of the company public user.
In addition, when `_get_public_user` creates a new public user,
it could link it to the company in `public_user_id` field.

closes odoo/odoo#33332

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-05-13 12:25:56 +00:00
..