This question has been flagged
5 Replies
11633 Views

Hello,

I would want to add a new group for an application in Odoo 8. 

E.g.:
Add the group "New sales group" to "Sale" application.
I did it from the Groups menu, but after save the new group, I can't see anymore the line with Sales options at the User menu. I'm not sure if this is a bug or if there is a workaround. I'm also tried to do it from code with the same results. 

So, the question: Is there a workaround to have another custom group for an application?

Update (23/01/2015):
E.g. This is the code which doesn't work. Added at addons/sale/security/sale_security.xml:

    <!-- New group -->
    <record id="base.group_sale_salesman_new_sales_group" model="res.groups">
        <field name="name">New Sales Group</field>
        <field name="category_id" ref="base.module_category_sales_management"/>
        <field name="implied_ids" eval="[(4, ref('base.group_sale_salesman'))]"/>
    </record>

    <!-- This is the default manager group for Sale application-->
    <record id="base.group_sale_manager" model="res.groups">
        <field name="name">Manager</field>
        <field name="comment">the user will have an access to the sales configuration as well as statistic reports.</field>
        <field name="category_id" ref="base.module_category_sales_management"/>
        <field name="implied_ids" eval="[(4, ref('base.group_sale_salesman_all_leads'))]"/>
        <field name="users" eval="[(4, ref('base.user_root'))]"/>
    </record>

Thank you in advance.

Regards.
Alejandro

Avatar
Discard
Best Answer

Hello Alejandro,

This is not the proper way to get your group under the "Application" Title.

Your newly created group is under the "Sales" Title.

It is just a configuration part. The demo is required for the same. If you want the demo you can contact me.

 

 

Avatar
Discard
Author

Hello Hardikgiri, I would want to watch that demo code, also, please watch my updated question.

Best Answer

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record model="ir.module.category" id="module_category_openacademy">
            <field name="name">open Academy</field>
            <field name="description">Helps you manage</field>
            <field name="sequence">5</field>
        </record>
        
        <record id="addition_id_test" model="res.groups">
            <field name="name">OpenAcademy/Manager</field>
            <field name="category_id" ref="module_category_openacademy"></field>
        </record>
 
    </data>
</openerp>

 

this code create group in code xml.

http://toolkt.com/site/security-in-openerp/

Avatar
Discard
Author

Hello Ramanan, I tried that for my case, but I'm getting the same error wrong behavior.. (please watch my updated question)

Best Answer

You need to add your newly created group to the implied_ids of one of the existing group in your desired category in order for the newly created group to appear in the same selection box. I haven't got time to dig to the code to know why is this the case and why the selection box disappear if we didn't do it, so take it as it is for now. YMMV.

Avatar
Discard