콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
1526 화면

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. 


아바타
취소
베스트 답변

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

아바타
취소