Reputation: 721
I ran into a weird situation. I have two custom modules (test 1 and test 2).In test 1, I created two groups (stock_picking_manager and stock_picking_user). Test 2 module has a model name (test_model). This model can only be accessed by the group from test 1( stock_picking_manager).
To achieve this I created ir.model.access.csv
as below:
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_test_2_role_test_1_manager,test_1_role manager,model_test_model,test_1.stock_picking_manager,1,1,1,1
Also test 1 depends on test 2. So I put the module (test 2) in depends of __openerp__.py.
When I removed both the module and tried to install test 1, it looks for test 2 and tries to install it, but as in test 2 ir.model.access.csv
, it depends on group stock_picking_manager, which will be created by test 1 it throws an error as below :
module loading failed: file security/ir.model.access.csv could not be processed:
No matching record found for external id: test_1.stock_picking_manager in field 'Group'
Can someone please help me.
Upvotes: 1
Views: 64
Reputation: 14801
Your custom module test2 has to depend on test1, because test1 got the groups, which are used in test2. So test1 has to be installed before test2 can be installed.
Upvotes: 0