Skip to Content
Menú
This question has been flagged
2 Respostes
2141 Vistes

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
Descartar

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
Descartar
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
Descartar
Related Posts Respostes Vistes Activitat
3
de nov. 24
30353
2
de gen. 22
3951
1
de des. 21
2943
0
de des. 21
2459
1
de nov. 16
4196