تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
5474 أدوات العرض

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.

الصورة الرمزية
إهمال
أفضل إجابة

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

   


الصورة الرمزية
إهمال
الكاتب

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

الكاتب أفضل إجابة

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

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
3
فبراير 23
5338
2
يونيو 25
4774
2
يناير 25
2550
3
يناير 24
2178
0
فبراير 24
1940