I'm learning OpenERP development and I'm stuck in a problem related to security and menu access rights, I've developed a very basic module which has just one test class and one test menu with a submenu and tree,form views .
The problem is when I log in using any user other than admin I can't access this module (I can't see the Test menu), although it's accessible to the admin user (and only to him)
Note that I didn't add any access rights or access rules (AFAIK from the documentation it should be global and accessible to all users !! )
Here is my module :
__init__.py
import testmod
.
__openerp__.py
{
'name': "Test Module",
'description': "Basic example of a (future) web module",
'category': 'Hidden',
'depends': ['base'],
'data': [
'test_view.xml',
],
'installable': True,
'application': False,
'auto_install': False,
}
.
testmod.py
from openerp.osv import fields, osv
class testmod_test(osv.Model):
_name = 'testmod.test'
_description = 'Test Model'
_columns = {
'test1': fields.char('Test 1', size=32, required=True, help='Test 1 help'),
'test2': fields.float('Test 2', help='Test 2 help'),
}
testmod_test()
.
test_view.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="testmod_test_form" model="ir.ui.view">
<field name="name">testmod.test.form</field>
<field name="model">testmod.test</field>
<field name="arch" type="xml">
<form string="Test" version="7.0">
<field name="test1" />
<field name="test2"/>
</form>
</field>
</record>
<record id="testmod_test_tree" model="ir.ui.view">
<field name="name">testmod.test.tree</field>
<field name="model">testmod.test</field>
<field name="arch" type="xml">
<tree string="Test">
<field name="test1" />
<field name="test2"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_testmod_test">
<field name="name">Test</field>
<field name="res_model">testmod.test</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem
name="Test"
id="menu_testmod_test"
/>
<menuitem
name="Test sub"
parent="menu_testmod_test"
id="menu_testmod_test_sub"
/>
<menuitem
name="Sub Test"
id="menu_subtest"
parent="menu_testmod_test_sub"
action="action_testmod_test"
/>
</data>
</openerp>
and I'm using OpenERP 7.0 in a linux platform (ubuntu 13.04)
Any help will be appreciated :), Thanks in advance