Help

4

Record rule how i can see all Team members leads to only team leader and sale orders only in draft state?

Avatar
Kamlesh Vadhiya

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

<field name="name">See Teams Leads</field>

<field name="model_id" ref="crm.model_crm_lead"/>

<field name="global" eval="True"/> <field name="domain_force">['&amp;','|','|',('section_id.user_id','=',user.id), ('section_id.member_ids', 'in', [user.id]),('user_id','=',user.id),('user_id','=',False)]</field>

</record>




<record id="group_see_only_quotation" model="res.groups"> <field name="name">See Only Quotation</field> <field name="comment">Thsi User Can Only Leads,Opportunities and Quotations.</field> </record>

        <record id="sale_security_sale_quatation" model="ir.rule"> <field name="name">Quotation Only</field> <field name="model_id" ref="sale.model_sale_order"/> <field name="global" eval="True"/> <field name="domain_force">[('state','=','draft')]</field> <field name="groups" eval="[(4,ref('bista_advancetech_ext.group_see_only_quotation'))]"/> </record>

Avatar
Discard
1 Answer
0
Avatar
Artem
Best Answer

<field name="groups" eval= [(4,ref('bista_advancetech_ext.group_see_only_quotation'))]"/>

This does not affect your rule because "ir.rule" has not got a field to store groups.

Maybe you want <search>  filters from "ir.ui.view"?

Avatar
Discard