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

Here is my ir.model.access.csv file:

name,group_id,perm_read,perm_write,perm_create,perm_unlink
group_scheduleb_manager,group_scheduleb_manager,TRUE,TRUE,TRUE,FALSE
group_scheduleb_user,base.group_user,TRUE,FALSE,FALSE,FALSE

When I restart the server and update my module, I see this error:

openerp.tools.convert: Import specification does not contain 'id' and we are in init mode, Cannot continue.

The group "group_scheduleb_manager" shows up correctly.  I created that in XML.  I just can't get the access lists to go through.  Any ideas?

아바타
취소
베스트 답변

There are two missing fields: id and model_id.  Here is a snippet from account module's:

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_product_product_account_user,product.product.account.user,product.model_product_product,group_account_user,1,0,0,0

Use 1 and 0 instead of TRUE and FALSE.

아바타
취소
작성자

I had copied the CSV headers from another module. Don't remember which one. The 'id' field, I assume, is what will be the External ID for the new access list, and I can just make up anything I like, correct? I'm still getting an error for the model field. It says, " No matching record found for external id 'mymod.scheduleb' in field 'Object'. The table I'm trying to provide access to is "mymod_scheduleb". I've tried every combination of identifiers I can think of. How do I know what to put in that spot?

작성자

Aha! It's working! Looks like you have to preface your table name with "model_"?

Yes, the id field will became the XML/External ID of that particular record. And yes, iIn OpenERP the XML/External ID of all models will be the model name prefixed with model_ (e.g. account_account --> model_account_account).

관련 게시물 답글 화면 활동
1
3월 15
14058
1
3월 15
4934
2
7월 22
37987
1
1월 22
8222
0
3월 19
3455