Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
2140 Vistas

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.

Mejor respuesta

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
Mejor respuesta

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
Publicaciones relacionadas Respuestas Vistas Actividad
3
nov 24
30343
2
ene 22
3950
1
dic 21
2940
0
dic 21
2457
1
nov 16
4194