Skip to Content
Menu
This question has been flagged
1 Reply
4288 Views

I keep getting the error "The user cannot have more than one user types" on my server.  I first ran across it trying to test out multi-site on my staging server, I also ran across it while testing an upgrade to the database and if I "Update all modules" from the Odoo Editor.


This is the closest to an error message I seem to get:

  File "/home/odoo/src/odoo/odoo/addons/base/models/res_users.py", line 405, in _check_one_user_type
raise ValidationError(_('The user cannot have more than one user types.'))
odoo.tools.convert.ParseError: "The user cannot have more than one user types.
None" while parsing /home/odoo/src/odoo/odoo/addons/base/security/base_groups.xml:14, near
<record model="res.groups" id="group_system">
<field name="name">Settings</field>
<field name="implied_ids" eval="[(4, ref('group_erp_manager'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>



I admit I don't know much about users or security or why this error is coming about.  Any help would be appreciated debugging it.


Odoo version 12.

Avatar
Discard
Author Best Answer

I figured this out.  In the end I used this piece of SQL code via psql on the command line of a staging server to get the offending user ID.

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

I got the (1, 9, 10) from the ID's of the User Types that were set up in my Odoo installation.  Yours might be different.

This returned a user ID, which I could look up and once I changed his access to Portal all was well.

Avatar
Discard
Related Posts Replies Views Activity
2
Sep 22
2437
0
Mar 19
1829
1
Mar 15
4972
1
Mar 15
3941
1
May 21
8114