Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

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

By
kkkkkkkkk
on 10/27/16, 4:25 AM 279 views

<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>

0
Artem
On 10/30/16, 3:10 PM

<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"?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/27/16, 4:25 AM
Seen: 279 times
Last updated: 10/30/16, 3:10 PM