Hi,
We want to create a user group in CRM (V15), where the users have access to opportunities where they sales person or all opportunities in the 'sales teams' they are members of or opportunities where sales team isn't assigned. Basically no visibility to opportunities of sales teams they are not team members of. Could anyone please help with the Rule Definition (Domain filter) to achieve this?
Many thanks in advance!
Best regards
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
1
Balas
5217
Tampilan
Hi,
You can try this record rule in your xml file inside the security.
<record id="crm_lead_opportunity_rule" model="ir.rule">
<field name="name">CRM Lead Team Lead/sales person Rule</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="domain_force">['|', '|', ('user_id', '=', user.id), ('team_id.user_id', '=', user.id),('team_id.member_ids', '=', user.id)]</field>
</record>
Regards
Many thanks for sharing. Works just as intended!
As suggested, used the below as the domain filter of the rule.
['|', '|', ('user_id', '=', user.id), ('team_id.user_id', '=', user.id),('team_id.member_ids', '=', user.id)]
BR
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
2
Agu 25
|
420 | ||
|
2
Mei 25
|
1446 | ||
|
1
Apr 25
|
1350 | ||
|
0
Mar 25
|
1420 | ||
|
0
Mar 25
|
1347 |
hi, this quite good think to check and try
https://odootricks.tips/about/building-blocks/security/record-rules/
Hi Mindaugas,
Thanks for the pointers, unfortunately not being technical am unable to find the way to relate "Team_id" and "sale_team_id" fields on the Lead/Opportunity model.
Any specific pointer on how this can be accomplished for validating if a user.id is part of a team_id would be extremely helpful.
Thanks in advance,
Best regards
@Jaideep, do you find the answer yet? i'm facing the same problem.
@fudo, we still looking at how to achieve this. Will post the answer once we have it.