This question has been flagged
1 Reply
61 Views

Good day, I'm encountering this bellow error when attempting to upgrade any module.

I've ran the sql :

SELECT r.uid
FROM res_groups_users_rel r
WHERE r.gid IN (1, 10, 11)
GROUP BY r.uid HAVING COUNT(r.gid) > 1;

In postgre which returns 0. For my database 11 = public user type, 10 = portal user type, and 1 = internal user type. Now I'm stumped on how to proceed. Any guidance would be awesome!

The user cannot have more than one user types.

View error context:
'-no context-'


Avatar
Discard
Best Answer

Your SQL sleuthing is on the right track, trying to find users who might be juggling more user types than they're supposed to. Since your query returns 0, it indicates there aren't any users directly violating the rule within the groups you're concerned about (1, 10, 11), at least not in a straightforward way.

Check for Inactive Users

Sometimes, inactive users can throw a wrench in the works. Make sure to check if there are any inactive users with multiple roles that might be causing this issue. You can modify the query to join with the res_users table and filter out active users.

Update Modules and Check Logs

Another angle is to update your modules via the command line using odoo-bin -u all -d yourdatabase, paying close attention to the logs for any clues about which module or operation triggers the error. Sometimes, the context of the error (specific module or operation) can give you a hint about where to look.

Avatar
Discard
Author

Thank you for the heads up!

What ended up solving my issue:
Default_User was archived and belonging to multiple groups. After fixing that the error was still being thrown.

Then OdooBot, the super user, wasn't allowed access to all companies on the database, setting permissions correctly for the super user fixed my error.