Skip to Content
Menu
This question has been flagged
5 Replies
9049 Views

When i try to delete a user, there always appears an error message: 

Integrity Error

The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set

[object with reference: im_chat_presence - im.chat.presence]

 

It seems the user doesnt logout from chat. So how to delete the user?

 

 

Avatar
Discard

Have you tried deleting directly in DB in table im_chat_presence look for the entry that references his ID and delete the row. Then try to delete the user again.

Best Answer

Hi, 

User, Products, Employees, Groups etc...  are the screens which once created having too many relationship with other screens. Of course they are afterall main ( Master )  screens in ERP systems. So regarding back to User delete problem, the reason behind you are facing the problem is when you going to delete the user, its reference available in this im_chat.presence object. However you can be able to delete the records in im_chat.presence table but unfortunately No menu or Actions avaialble for this object. So you must need to delete from backend database interface. 

I am sure once you delete records from im_chat.presence object, you will get another problem like,

Integrity Error

The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set

[object with reference: res_groups - res.groups ]

And once you remove user from Groups, then another problem you will face.

Solution :  You can deactivate user. Just untick "Active" field. So user will be deactivated and it will not be able to see anywhere in system. 

Advice : As I have said ago, some master records created once, Its not good to delete them instead, deactivate them.

Hope this explanation help you in order to understand the behaviour of Odoo.

Avatar
Discard

I have deleted public user by error. Like you say, I get many Integrity errors. How to recreate this public user?

Best Answer

Solution : im_chat_presence is set required=True .You must change required=False in that field is working properly

Avatar
Discard