flectra/addons/crm/security/crm_security.xml

91 lines
3.8 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
2018-01-16 11:34:37 +01:00
<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_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>
2018-01-16 13:51:36 +01:00
<!-- Multi Branch rule -->
<record id="crm_lead_multi_branch_rule" model="ir.rule">
<field name="name">Lead multi-branch</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="global" eval="True"/>
<field name="domain_force">['|', ('branch_id', '=', False), '|', ('branch_id', '=', user.default_branch_id.id),
('branch_id', 'in', user.branch_ids.ids)]
</field>
</record>
</data>
2018-01-16 11:34:37 +01:00
</flectra>