Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5580 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 9 22
3837
0
thg 3 19
2618
1
thg 3 15
5789
1
thg 3 15
5106
1
thg 5 21
9692