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

Security problem

By
Dr Obx
on 11/19/15, 4:30 AM 544 views

Guys,

I added a groups, security rules and on one machine it works but on another one it doesen't.

ir.model.access.csv

<pre>

"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"

"user_configurator","user_configurator","model_configurator","imerge_group_user",1,0,0,0

"manager_configurator","manager_configurator","model_configurator","imerge_group_manager",1,1,1,1

</pre>

security_menu.xml

<pre>

<?xml version="1.0" encoding="UTF-8"?>

<openerp>

<data>

<record model='ir.ui.menu' id='security_menu'>

<field name='groups_id' eval="[(4, ref('imerge_group_manager')),(4, ref('imerge_group_user'))]"/>

</record>

<record model='ir.ui.menu' id='security_list_menu1'>

<field name='groups_id' eval="[(4, ref('imerge_group_manager')),(4, ref('imerge_group_user'))]"/>

</record>

<record model='ir.ui.menu' id='security_list_menu2'>

<field name='groups_id' eval="[(4, ref('imerge_group_manager')),(4, ref('imerge_group_user'))]"/>

</record>

</data>

</openerp>

</pre>

security.xml

<pre>

<?xml version="1.0" encoding="UTF-8"?>

<openerp>

<data>

<record model='ir.module.category' id='security_module_category'>

<field name='name'>Title generator</field>

<field name='sequence'>10</field>

</record>

<record id='imerge_group_manager' model='res.groups'>

<field name='name'>Manager</field>

<field name='category_id' eval='security_module_category'/>

<field name="users" eval="[(4, ref('base.user_root'))]"/>

</record>

<record id='imerge_group_user' model='res.groups'>

<field name='name'>User</field>

<field name='category_id' eval='security_module_category'/>

<field name="users" eval="[(4, ref('base.user_root'))]"/>

</record>

</data>

</openerp>

</pre>

Can anyone tell me what I've done wrong ?

I'm getting this error:

Exception: Module loading iMerge failed: file iMerge/security/ir.model.access.csv could not be processed:

Line 1 : No matching record found for external id 'imerge_group_user' in field 'Group'

1

Axel Mendoza

--Axel Mendoza--
10205
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 11/20/15, 12:06 AM

Check the order of the files in the data entry of the __openerp__.py dict, the file that define the group imerge_group_user need to be defined first than where the record id imerge_group_user is used in menus or ir.model.access csv entries

OMG silly Me :) Thank you Axel Problem solved :)

Dr Obx
on 11/20/15, 4:12 AM

Happy to help

Axel Mendoza
on 11/20/15, 4:15 AM

I just did not knew that the order is so important :) Now I know :) Thank you again :)

Dr Obx
on 11/20/15, 4:33 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: 11/19/15, 4:30 AM
Seen: 544 times
Last updated: 11/20/15, 4:12 AM