I have created a domain_force to sort out contacts through sale_teams or sales_person.
in preference, I set sales_team "team_id". if the user salesteam is "direct sales" then the contacts having same sales_team " directsales" then it only show corresponding contacts.
<odoo> <data noupdate="0"> <record model="ir.rule" id="ir_my_custom_rule"> <field name="name">salesteamaccess</field> <field name="model_id" ref="base.model_res_partner"/> <field name="domain_force">['|','|',('user_id','=',user.id),('user_id','=',False),('team_id','=', [user.team_id])]</field> </record> </data> </odoo>
but this doesnt work well as per need. If I logged in different user then it shows maximum reccurssive occured error. |