Skip to Content
Menu
This question has been flagged
1 Reply
3143 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'

Avatar
Discard
Best Answer

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

Avatar
Discard
Author

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

Happy to help

Author

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

Related Posts Replies Views Activity
1
Dec 22
23147
2
Jun 20
1873
2
Dec 19
13441
1
Sep 16
19831
1
Mar 15
6590