Odoo Help

3

How to add a new group for an Application - Odoo 8

By
Alejandro Perez Cosio
on 1/20/15, 7:49 AM 4,152 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

3

Hardikgiri Goswami

--Hardikgiri Goswami--
1133
| 2 1 5
Rajkot, India
--Hardikgiri Goswami--

OpenERP/Odoo Customization/Integration Expert / Python Programmer

Skype ID : hardikgiri.goswami

Hardikgiri Goswami
On 1/21/15, 3:24 AM

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.

 

 

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

Alejandro Perez Cosio
on 1/23/15, 8:15 AM
1
Demirel yakito
On 1/21/15, 2:51 AM

<?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/

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

Alejandro Perez Cosio
on 1/23/15, 8:13 AM
0
Muhammad Irfan
On 4/5/17, 7:02 AM

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.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 1/20/15, 7:49 AM
Seen: 4152 times
Last updated: 4/5/17, 7:03 AM