Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
7285 Widoki

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

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

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)]})    ​


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
maj 20
7380
5
lut 19
7685
1
mar 18
4074
1
lis 17
7788
3
maj 25
11322