This question has been flagged
2 Replies
9037 Views

Hello all,

I am passing data from a Odoo 10 to Odoo 12 in the Community version (as migration scripts did not seem to be stable enough).

When importing several secondary objects like Messages, Mail Channels, I get the following error:

Unknown error during import: <class 'odoo.exceptions.ValidationError'>: ('Error while validating constraint\n\nThe requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: Discussion Channel, Operation: read) - (Records: [11], User: 2)\nNone', None) Resolve other errors first

Note that I am running this command as Odoo admin, so cannot see why I should lack rights.

Even when I resolve all the other errors, this problem persists.

Does anyone has a comment about where to search?

Thank you very much, hj

Avatar
Discard
Author Best Answer

I believe I roughly understood why this error is happening. 

When performing an import, Odoo executes some of the actions (verify a record, write a record) AS another user, taken from one of the import fields (as if a certain user would have written a certain message). If that user in the current import context does not have the right to perform that operation, this results in an error. 

The solution is either to modify the values such that eventual user ids specified in the import have the right to manipulate the imported objects and the related ones, or modify the rights so that these objects can be manipulated by that id.

Avatar
Discard
Best Answer

Hi,

Please check the Access rights or you can create the access rights for "Discussion Channel"

I think you are create new user or use demo user (Records: [11], User: 2) which does not have access of that record either you can give the access to that user for Employee or create a new access right for portal user.

Run Developer Debug mode

Go to Settings -> Technical -> Security -> Access rights

Avatar
Discard