Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

I want to hide the Employee Chatter Feed by a record rule that allows the loging user to see his own Employee Chatter Feed.

I try a record Rule: 

Object: mail.message

Domain: [('parent_id','=',user.id)]

But is not working.


I`m in v11 Odoo SaaS


Thanks.

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

Hello Mario Molinos,

You can use below rule to allow employee to see their own chatter.

<record model="ir.rule" id="employee_allow_own_chatter">

    <field name="name">Rule to Allow Own chatter</field>

    <field name="model_id" ref="model_mail_message"/>

    <field name="global" eval="True"/>

    <field name="domain_force">[('author_id', '=', user.partner_id.id)]</field>

</record>

Hope it may help you!

Thank you!

Regards,




Email:      odoo@aktivsoftware.com  

Skype: kalpeshmaheshwari

   


Ảnh đại diện
Huỷ bỏ
Tác giả

I´m not the Author of all the messages in my Chatter. So this Domain doesn´t works for my purpose.

Tác giả Câu trả lời hay nhất

I solved it by a Record Rule in the mail.message model.

['|',('res_id','=',user.employee_ids.id),('model','!=','hr.employee')]

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 2 23
5339
2
thg 6 25
4777
2
thg 1 25
2551
3
thg 1 24
2182
0
thg 2 24
1941