跳至內容
選單
此問題已被標幟
1 回覆
2510 瀏覽次數

Hello, I have created a custom module in my Odoo instance and have implemented a new user group within it. My objective is to assign this group to users by default upon their creation. Could you please provide guidance on how to achieve this?

頭像
捨棄
最佳答案

Hi,
If you need to assign it for all the users from code, you can do it by overriding the create method of the res.users model.

But the cleaner solution, will be updating the Default user template with this user group.

* Navigate to general settings and click "Default User Template"
* Add your group for this user
* Now on creating new user, this group will be automatically added






Thanks

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
4
10月 24
1447
0
4月 24
1699
3
4月 24
2342
0
3月 24
1906
1
8月 25
1562