Odoo Help

1

Add implied_ids to existing group via XML

By
Jerome Guerriat
on 12/7/15, 3:47 AM 1,307 views

Hi everyone!

I have created a new group for "limited salesman", which can view less informations than the default salesman group. The main definition of my group is:

<record id="group_sale_limited" model="res.groups">
<field name="name">Group for limited salesman</field>
<field name="comment">[...]</field>
<field name="category_id" ref="base.module_category_sales_management"/>
</record>


Now, i would like this group to be added as an "implied" group for the existing salesman group (so, users added to the base salesman group would also be added to my custom group). I'd like to do this in XML, by i haven't found a way to do it so far. Here is what i tried:

<record id="base.group_sale_salesman" model="res.groups">
<field name="implied_ids" eval="[(4, ref('my_module.group_sale_limited'))]"/>
</record>


But this doesn't seem to work, as the base.group_sale_salesman doesnt have "group for limited salesman" in its "inherited" tab.

ow, i know that i could manually add it, and i could also do it in python, but then i couldn't ensure that the group is correctly added when the module is installed....Could anyone help me doing this?
Thanks a lot!

0

IT Libertas

--IT Libertas--
828
| 4 3 7
Saint Petersburg, Russian Federation
--IT Libertas--

Visit us: itlibertas.com

IT Libertas is a team of developers and automation experts to help you to unlock Odoo ERP system's potential. We have been communicating with end users to whom the software became a main business tool since 2012. As a result, we are proud of dozens of successful implementations.

IT Libertas guarantees deadlines predictability and transparent pricing. We rely upon the best international practices and invest in local markets' study. That is why the company's services are in demand of European, Asian, American and African entrepreneurs.

We are open for cooperation and keep searching for new solutions to the end that IT Libertas clients go ahead of the curve, deal with less routine and generate more profit.

IT Libertas
On 5/28/17, 6:22 AM

Hi,

basically your solution works in my few cases. Perhaps, those hints might help:

1. Check whether in your xml there is no noupdate="1". Since base.group_sale_salesman already exists in such a case it would not be updated while installing

2. [Not a solution] Make your new group also have 'implied_ids' with 'base.group_user' (as salesman has). 

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: 12/7/15, 3:47 AM
Seen: 1307 times
Last updated: 5/28/17, 6:22 AM