Skip to Content
Menu
This question has been flagged

Hi community,

I want to make the value of an existing Boolean field in res.config.settings(group_route_so_line) into true while installing my custom module.I have tried to rewrite the field but it don't work for me.How can i achieve that, am using odoo11.

Thanks

Avatar
Discard
Author Best Answer

Hi,

Thanks for the help guys

i solved my issue by following code

<data noupdate="0">
<record id="sales_team.group_sale_manager" model="res.groups">
<field name="implied_ids" eval="[(4, ref('sale_stock.group_route_so_lines'))]"/>
</record>
</data>

I have just added my required user group to the group corresponding to group_route_so_line using code.

Thanks for the response

Avatar
Discard
Best Answer

you can register post init hook in manifest or create <function/> entry in the data file and call model method for add implied group like

​<function model="res.config.settings" name="set_implied_group"/>

@api.model
def set_implied_group(self):
    self.env.ref('base.group_user').write({'implied_ids': [(4, self.env.ref('sale_stock.group_route_so_lines').id)]})    ​


Avatar
Discard
Related Posts Replies Views Activity
2
May 20
6059
5
Feb 19
6822
1
Mar 18
3025
1
Nov 17
6751
4
Apr 23
9910