Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1521 Widoki

My models.py is as follows:

from odoo import fields, models
classAmostra(models.Model):   
_name ='regamostras.amostra'
    identificacao = fields.Char("Identificação")
  laboratorio = fields.Char("Laboratorio")



And my ir.model.access.csv is:
id,name,model_id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_registroAmostras_amostra,access.registroAmostras.amostra,model_regamostras_amostra,base.group_user,1,1,1,1


As you can see, my model_id is model_regamostras_amostra, wich is
correct when i check the "External References" tab in my Odoo environment. 

Some other questions that i have are, as i understand it, the ir.model.access.csv
is necessary for anyone (any specified group) to be able to open and use the model.
Without it, the views file shouldnt work by it self right? Also, im not sure i
understand the documentation for the fields "id" and "name", but it didnt give any
errors (so far), so im not so concerned about it. 


Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

Not sure about what are you upto ? Is there any issues that you are facing with the added code ?

For any newly added model, user has to be set up the access rights for it, like for which user group, what permission has to be granted etc.

To know more about odoo security mechanism: https://www.youtube.com/watch?v=mzg3EGD_6Gw

Thanks

Awatar
Odrzuć