Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
3630 Näkymät

In my case I have to set all the companies in allowed companies that allow the user to see the e-commerce categories in my e-commerce site.
Is there any way that if user is created than we can add all the companies by default in his allowed companies?
I am using odoo 11.

Avatar
Hylkää
Paras vastaus

You need to write default_get for allowed companies. In default_get you can set all active companies on new user creation.


default=lambda self: self.env['res.company'].search([]).ids
Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
elok. 25
3427
1
heinäk. 25
1576
1
elok. 25
1152
0
toukok. 25
1911
2
toukok. 25
2420