Possible fix for login error

In some case, you may found a weird Access Denied (Document type: Users, Operation: read) after deep system upgrade. While checking the setting for that user, it seem all correct. This is quite a cumber some for me, at least.

Following is the cause I found after debugging the system.


Problem caused by Record Rule – “user rule”

You can test it whether this is the problem, by try to inactive this rule. If user can log in then, this is it. I found this problem happen, after I upgrade account module.

The problem was becuase user records for the company in res_company_users_rel table was deleted. I fix it by adding it back using following SQL.

insert into res_company_users_rel (select 1, id from res_users where id not in (1))

That’s it!