1
votes

I have a strange problem with OpenERP7.

I try to explain it:

I'm developing a new module where I have to create at least 5 group of users.

In this case in Settings / Users / Users / ADMINISTRATOR / Access Rights.

I find the category group MyModule, but with check-box not in application section with a drop-down menu.

This problem is not issued if the user groups are only 2.

Can someone put me on the right way?

1
Have you tried with following answer? It is also advisable to share feedback of any answer.Bhavesh Odedra

1 Answers

0
votes

If you want to show your security under with drop-down option than you need to use below information/code.

You need to create one .xml file which will represent the information of security name and it's options for example:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data noupdate="0">
        <record model="ir.module.category" id="module_category_name_test">
            <field name="name">Your Application Name</field> 
            <field name="sequence">7</field>
        </record>

        <record id="group_name_test_user" model="res.groups">
            <field name="name">Application User name</field>
            <field name="category_id" ref="module_category_name_test"/>
            <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
        </record>

        <record id="group_name_test_manager" model="res.groups">
            <field name="name">Application Manager name</field>
            <field name="category_id" ref="module_category_name_test"/>
            <field name="implied_ids" eval="[(4, ref('group_name_test_user'))]"/>
            <field name="users" eval="[(4, ref('base.user_root'))]"/>
        </record>

        <record id="group_name_n_number_option" model="res.groups">
            <field name="name">Application N number of Users</field>
            <field name="category_id" ref="module_category_name_test"/>
            <field name="implied_ids" eval="[(4, ref('group_name_test_user'))]"/>
            <field name="users" eval="[(4, ref('base.user_root'))]"/>
        </record>
    </data>
</openerp>

NOTE:

Don't forget to give read, write, create and delete access right to the new model/object/class of your application.