12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data noupdate="0">
- <record model="ir.module.category" id="module_category_sales_team">
- <field name="name">Sales Teams</field>
- <field name="sequence">2</field>
- </record>
- <record id="group_see_only_own_team" model="res.groups">
- <field name="name">See only own team</field>
- <field name="category_id" ref="sales_team_security.module_category_sales_team"/>
- </record>
- </data>
- <data noupdate="1">
- <record id="sale_order_team_rule" model="ir.rule">
- <field name="name">Sales Team Orders</field>
- <field ref="sale.model_sale_order" name="model_id"/>
- <field name="domain_force">['|', ('message_follower_ids', 'in', user.partner_id.ids), '|', ('section_id', 'in', user.sale_team_ids.ids), ('section_id', '=', False)]</field>
- <field name="groups" eval="[(4, ref('sales_team_security.group_see_only_own_team'))]"/>
- </record>
- <record id="sale_order_report_team_rule" model="ir.rule">
- <field name="name">Sales Team Orders Analysis</field>
- <field ref="sale.model_sale_report" name="model_id"/>
- <field name="domain_force">['|', ('message_follower_ids', 'in', user.partner_id.ids), '|', ('section_id', 'in', user.sale_team_ids.ids), ('section_id', '=', False)]</field>
- <field name="groups" eval="[(4, ref('sales_team_security.group_see_only_own_team'))]"/>
- </record>
- <record id="sale_order_line_team_rule" model="ir.rule">
- <field name="name">Sales Team Order Lines</field>
- <field ref="sale.model_sale_order_line" name="model_id"/>
- <field name="domain_force">['|', ('message_follower_ids', 'in', user.partner_id.ids), '|', ('section_id', 'in', user.sale_team_ids.ids), ('section_id', '=', False)]</field>
- <field name="groups" eval="[(4, ref('sales_team_security.group_see_only_own_team'))]"/>
- </record>
- <record id="res_partner_team_rule" model="ir.rule">
- <field name="name">Sales Team Partners</field>
- <field ref="base.model_res_partner" name="model_id"/>
- <field name="domain_force">['|', ('message_follower_ids', 'in', user.partner_id.ids), '|', ('section_id', 'in', user.sale_team_ids.ids), ('section_id', '=', False)]</field>
- <field name="groups" eval="[(4, ref('sales_team_security.group_see_only_own_team'))]"/>
- </record>
- <record id="crm_lead_team_rule" model="ir.rule">
- <field name="name">Sales Team Leads/Opportunities</field>
- <field ref="crm.model_crm_lead" name="model_id"/>
- <field name="domain_force">['|', ('message_follower_ids', 'in', user.partner_id.ids), '|', ('section_id', 'in', user.sale_team_ids.ids), ('section_id', '=', False)]</field>
- <field name="groups" eval="[(4, ref('sales_team_security.group_see_only_own_team'))]"/>
- </record>
- <record id="crm_lead_report_team" model="ir.rule">
- <field name="name">Sales Team Leads Analysis</field>
- <field ref="crm.model_crm_lead_report" name="model_id"/>
- <field name="domain_force">['|', ('message_follower_ids', 'in', user.partner_id.ids), '|', ('section_id', 'in', user.sale_team_ids.ids), ('section_id', '=', False)]</field>
- <field name="groups" eval="[(4, ref('sales_team_security.group_see_only_own_team'))]"/>
- </record>
- <record id="crm_phonecall_team_rule" model="ir.rule">
- <field name="name">Sales Team Phone Calls</field>
- <field ref="crm.model_crm_phonecall" name="model_id"/>
- <field name="domain_force">['|', ('message_follower_ids', 'in', user.partner_id.ids), '|', ('section_id', 'in', user.sale_team_ids.ids), ('section_id', '=', False)]</field>
- <field name="groups" eval="[(4, ref('sales_team_security.group_see_only_own_team'))]"/>
- </record>
- <record id="crm_phonecall_report_team" model="ir.rule">
- <field name="name">Sales Team Phone Calls Analysis</field>
- <field ref="crm.model_crm_phonecall_report" name="model_id"/>
- <field name="domain_force">['|', ('message_follower_ids', 'in', user.partner_id.ids), '|', ('section_id', 'in', user.sale_team_ids.ids), ('section_id', '=', False)]</field>
- <field name="groups" eval="[(4, ref('sales_team_security.group_see_only_own_team'))]"/>
- </record>
- <record id="sales_team_team_rule" model="ir.rule">
- <field name="name">Own Sales Teams</field>
- <field ref="sales_team.model_crm_case_section" name="model_id"/>
- <field name="domain_force">['|', ('message_follower_ids', 'in', user.partner_id.ids), ('id', 'in', user.sale_team_ids.ids)]</field>
- <field name="groups" eval="[(4, ref('sales_team_security.group_see_only_own_team'))]"/>
- </record>
- </data>
- </openerp>
|