flectra/addons/crm/security/crm_security.xml
2018-01-16 02:34:37 -08:00

90 lines
3.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data>
<record id="group_use_lead" model="res.groups">
<field name="name">Show Lead Menu</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record model="res.users" id="base.user_root">
<field eval="[(4,ref('base.group_partner_manager'))]" name="groups_id"/>
</record>
<record id="contacts.res_partner_menu_config" model="ir.ui.menu">
<field name="name">Configuration</field>
<field name="groups_id" eval="[(4, ref('sales_team.group_sale_manager'))]"/>
</record>
</data>
<data noupdate="1">
<record id="crm_rule_personal_lead" model="ir.rule">
<field name="name">Personal Leads</field>
<field ref="model_crm_lead" name="model_id"/>
<field name="domain_force">['|',('user_id','=',user.id),('user_id','=',False)]</field>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
</record>
<record id="crm_rule_lead_assigned_activities" model="ir.rule">
<field name="name">Leads with assigned activities</field>
<field ref="model_crm_lead" name="model_id"/>
<field name="domain_force">[('activity_ids.user_id','=',user.id)]</field>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
</record>
<record id="crm_rule_all_lead" model="ir.rule">
<field name="name">All Leads</field>
<field ref="model_crm_lead" name="model_id"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman_all_leads'))]"/>
</record>
<record id="calendar_event_global" model="ir.rule">
<field name="name">Hide Private Meetings</field>
<field ref="model_calendar_event" name="model_id"/>
<field eval="1" name="global"/>
<field name="domain_force">['|',('user_id','=',user.id),('show_as','=','busy')]</field>
</record>
<record id="crm_rule_personal_lead_report" model="ir.rule">
<field name="name">Personal Leads Analysis</field>
<field ref="model_crm_opportunity_report" name="model_id"/>
<field name="domain_force">['|',('user_id','=',user.id),('user_id','=',False)]</field>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
</record>
<record id="crm_rule_all_lead_report" model="ir.rule">
<field name="name">All Leads Analysis</field>
<field ref="model_crm_opportunity_report" name="model_id"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman_all_leads'))]"/>
</record>
<record model="ir.rule" id="opp_report_multi_company">
<field name="name">Opportunity Analysis multi-company</field>
<field name="model_id" ref="model_crm_opportunity_report"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="crm_activity_report_rule_all_activities" model="ir.rule">
<field name="name">All Activities</field>
<field ref="model_crm_activity_report" name="model_id"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman_all_leads'))]"/>
</record>
<record id="crm_activity_report_rule_personal_activities" model="ir.rule">
<field name="name">Personal Activities</field>
<field ref="model_crm_activity_report" name="model_id"/>
<field name="domain_force">['|',('user_id','=',user.id),('user_id','=',False)]</field>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
</record>
</data>
</flectra>