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

Are access rights (record rules) bugged or I'm missing something? The only user that can see multiple companies, is admin user. Other users, does not matter what access rights they have, they can only see one company that is chosen for them, even if I put all companies in allowed companies section, that user still sees only company that is chosen for him (which is called representing company). Is the only way to modify record rules or I'm missing something?

Ảnh đại diện
Huỷ bỏ

Even am facing this problem, Every time one cannot keep going and changing the Company in the Preference.. Any alternate way will be good.

Câu trả lời hay nhất

A user can switch between his allowed companies with the Preferences menu, but he will always see only the selected company with the current record rules.

If you want your user to see the records of all his allowed companies at the same time, you have to edit the ir.rule for this object and put something like that:

    <record id="product.product_comp_rule" model="ir.rule">
        <field name="domain_force">['|',('company_id','in',[c.id for c in user.company_ids]),('company_id','=',False)]</field>
    </record>
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 10 19
4185
0
thg 6 16
3569
2
thg 2 16
5044
1
thg 3 15
5417
2
thg 2 25
2724