Skip to Content
Menu
This question has been flagged
1 Reply
707 Views
I just want every user to see a partner and thanks 


Avatar
Discard
Best Answer

Hi Mohamed,


You need to write an Record Rule for Partner/Contact table to achieve that.


Note:- See the answer in Comment because not able to copy code here in format.


Thanks & Regards,





Avatar
Discard

<record model="ir.rule" id="partner_view_rule_salesperson">
<field name="name">Sales Person View Rule</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]" />
<field name="domain_force">[('user_id', '=', user.id)]</field>
</record>
For the Managers,

<record model="ir.rule" id="partner_view_rule_manager">
<field name="name">Sales Person View Rule</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="groups" eval="[(4, ref('sales_team.group_sale_manager'))]" />
<field name="domain_force">[(1, '=', 1)]</field>
</record>

Author

thnak you
but in account Appears :

The requested operation ("read" on "Contact" (res.partner)) was rejected because of the following rules:

Related Posts Replies Views Activity
3
Apr 24
1008
0
May 24
46
1
Apr 24
1822
4
Sep 23
3084
2
Sep 23
5592