Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
10162 Prikazi

Hi everybody,

 

I'm beginning with Odoo and have encountered a problem when I've trie to delete a contact (when I've given access to portal only, for the others : it's OK), I get the following error message : 

Odoo Warning - Validation 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: Users - res.users]

How can I solve the problem and delete the contact ? 
Thanks !
Clara 

Avatar
Opusti
Best Answer

1) Go to users list
2) Remove filter "Regular users only" from search field (top right)
3) After step 2 you see full user list (with portal users)
4) Delete selected user
5) Delete Contact


Avatar
Opusti

Odoo 14 does not list portal users or logins, how do you access these logins

That was the clue.. my error does not indicate that there is a "user" associated with the partner I want to delete, but there is. To delete, needed to delete the User First, then the Contact as you note. Thank you!

Error was longer but constraint was: "res_users_partner_id_fkey"

Best Answer

To get the list of users in 14+ go to setting > general settings > manage users. On the top right, remove the filter "internal users" and you will see a listing of all of the users. You can then delete the contacts that were associated with that user.

Avatar
Opusti