Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
5100 Näkymät

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
Hylkää
Tekijä Paras vastaus

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
syysk. 22
3389
0
maalisk. 19
2311
1
maalisk. 15
5444
1
maalisk. 15
4634
1
toukok. 21
9199