Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3576 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 25
3379
1
thg 7 25
1546
1
thg 8 25
1152
0
thg 5 25
1879
2
thg 5 25
2350