Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Error creating access lists via module

By
Jeff Beidler
on 2/2/15, 7:53 PM 858 views

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?

1

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 2/2/15, 8:36 PM

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?

Jeff Beidler
on 2/3/15, 11:44 AM

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

Jeff Beidler
on 2/3/15, 12:09 PM

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).

Ivan
on 2/4/15, 2:55 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/2/15, 7:53 PM
Seen: 858 times
Last updated: 3/16/15, 8:10 AM