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.

6

What are these in ir.model.access.csv ? [Closed]

By
priyankahdp
on 4/19/13, 7:29 AM 10,080 views

The Question has been closed

by
priyankahdp
on 04/22/2013 04:48:53

Please explain me seperately what are below names.?
1.id
2.name
3.model_id/id
4.group_id/id
5.perm_unlink

id  name    model_id/id group_id/id perm_read   perm_write  perm_create perm_unlink
order_manager   Order user  model_lunch_order   group_lunch_manager 1   1   1   1

I'm confused about above fields.in Doc's also not detail about these csv fields.

  • model mean like res.users.? but its used underscore mark.not dots

my model class name is bpl.worker.its used to save records of workers in BPL plantation company.then how its' csv file should be.?

id  name    model_id/id group_id/id perm_read   perm_write  
perm_create perm_unlink
model_bpl_worker_manager    bpl_worker  model_bpl_worker    
group_checkroll_manager 1   1   1   1
model_bpl_worker_user   bpl_worker  model_bpl_worker    
group_checkroll_user    1   1   1   1

is this ok.? after added csv file its gives me a below error. i'm login as manager role.and gives all permission to him in all model classes also

2013-04-19 10:30:49,915 9886 WARNING demo openerp.addons.base.ir.ir_model: Access Denied by ACLs for operation: read, uid: 4, model: bpl.res.users
2013-04-19 10:30:49,916 9886 ERROR demo openerp.netsvc: Access Denied
Sorry, you are not allowed to access this document. Please contact your system administrator if you think this is an error.

(Document model: bpl.res.users)

the NAME voice must be unique. Try to chang it in the second line (or first) and restart

Francesco OpenCode
on 4/19/13, 8:42 AM

wow...thanks friend..its done your first suggetion worked.that time issue with my cache in browser :-)

sorry to disturb u..any idea on this issue http://help.openerp.com/question/11827/openerp-7-onclick-function/

priyankahdp
on 4/19/13, 8:56 AM

I'm happy you solve your problem. I will read your other answer late...:)

Francesco OpenCode
on 4/19/13, 9:01 AM
10

Francesco OpenCode

--Francesco OpenCode--
3608
| 5 7 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
On 4/19/13, 7:44 AM
  • id = unique identify for the permission (Example: MY_MODULE_res_partner_manager)
  • name = unique name for the permission (Example: res_partner manager)
  • model_id/id = the model unique name of the class you want apply permission on (Example model_res_partner)
  • group_id/id = group permission apply on (yopu can define it in xml group file or call an existing group with syntax module.group_id)
  • perm_read,perm_write,perm_create,perm_unlink = the 4 values for the relative permission to read, write,create,unlink record on defined class. 1 is True (you can do this action) and 0 is Faslse (you can't)

A simple way to understand this file is to read an existing csv in some OpenERP base module like sale, account, product, etc...

Some usefull link:

thanks Francesco Apruzzese. name means not a model name.? is it a user role name.?

priyankahdp
on 4/19/13, 8:18 AM

name is a name that you associate with the record. It'a a mnemonic system to read the file, too.

Francesco OpenCode
on 4/19/13, 8:22 AM

Done.Try the code in my comment.

Francesco OpenCode
on 4/19/13, 8:37 AM

thanks friend.its sorted :-)

priyankahdp
on 4/22/13, 4:48 AM
0
Contador Loja
On 7/24/14, 7:18 PM

permission_bpl_worker_manager,bpl_worker manager,model_bpl_worker,group_checkroll_manager,1,1,1,1

About This Community

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

Question tools

1 follower(s)

Stats

Asked: 4/19/13, 7:29 AM
Seen: 10080 times
Last updated: 12/3/15, 4:52 AM