Skip to Content
Menu
This question has been flagged
2 Replies
2112 Views

I am trying to create a access right for sale.order, but the sale.model_sale_order, model_sale_order and sale_crm.model_sale_order none of them works. The odoo.log says the model_id is wrong but I can't find anyother suggestions from internet or in the External Identifiers in Odoo settings.


Here is the full line: 

access_sale_order,Access Sale Order,sale.model_sale_order,test-module.group_sales,1,1,1,1

Here is the error: 

ERROR: null value in column "model_id" of relation "ir_model_access" violates not-null constraint

Version: Odoo 16

Any help is greatly appreciated.
Br. Turi

Avatar
Discard

Turi, were you able to resolve this? I have the same issue and have tried everything.

Best Answer

Hi,
Make sure to add dependency to your module, for example sale.order model is coming from the app sale, you add this depends key in the manifest and in the access right file give as sale.model_sale_order

Thanks

Avatar
Discard
Best Answer

Check the first line of the file to make sure the values are mapped to the correct fields.

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink

Avatar
Discard
Related Posts Replies Views Activity
3
Nov 24
30274
2
Jan 22
3921
1
Dec 21
2921
0
Dec 21
2425
1
Nov 16
4170