Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
5131 Vistas

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
Descartar
Autor Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
sept 22
3407
0
mar 19
2322
1
mar 15
5448
1
mar 15
4728
1
may 21
9239