Purpose: Having the res_group defined in base and sales_team auto installed with mail doens't make sense. - Move the empty res_config class and the related view from base_setup to sales_team (base_setup only contains the 'General Settings' model and views - Move the 'sale' related content from product to sale module (Access rights, menuitems,...) - Set sales_team at autoinstall False. The module is installed when needed by crm or sale for example - Set sales_team as a dependency of voip. (Access rights defined for configuration purpose) - Set sales_team ad a dependency of subscription (Access rights issue too) [FIX] account: move some ir.model.access to sale module [FIX] payment: Move some ir.rule to website_sale [FIX] stock: move some ir.model.access rule to sale_stock [FIX] project: Move some ir.model.access rules to crm_project_issue [FIX] mrp: Move some ir.model.access rules to sale_mrp [FIX] calendar: move some ir.model.access rules to crm Rename xmlids accordingly. Example: 'base.group_sale_manager' becomes sales_team.group_sale_manager. [ADD] sales_team: See own documents => See only his sales team Moved the "User: Own Leads Only", "User: All Leads" and "Manager" groups from sale and crm into sales_team module. Add the record rules so that user can see only his Own Sales Team if "See Own Leads" is sales right and can see all sales teams if he is having sales rights of "See All Leads" or manager.
61 lines
3.1 KiB
XML
61 lines
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data noupdate="0">
|
|
<record id="group_sale_salesman" model="res.groups">
|
|
<field name="name">User: Own Documents Only</field>
|
|
<field name="category_id" ref="base.module_category_sales_management"/>
|
|
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
|
<field name="comment">the user will have access to his own data in the sales application.</field>
|
|
</record>
|
|
|
|
<record id="group_sale_salesman_all_leads" model="res.groups">
|
|
<field name="name">User: All Documents</field>
|
|
<field name="category_id" ref="base.module_category_sales_management"/>
|
|
<field name="implied_ids" eval="[(4, ref('group_sale_salesman'))]"/>
|
|
<field name="comment">the user will have access to all records of everyone in the sales application.</field>
|
|
</record>
|
|
|
|
<record id="group_sale_manager" model="res.groups">
|
|
<field name="name">Manager</field>
|
|
<field name="comment">the user will have an access to the sales configuration as well as statistic reports.</field>
|
|
<field name="category_id" ref="base.module_category_sales_management"/>
|
|
<field name="implied_ids" eval="[(4, ref('group_sale_salesman_all_leads'))]"/>
|
|
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
|
</record>
|
|
|
|
<record id="base.default_user" model="res.users">
|
|
<field name="groups_id" eval="[(4,ref('sales_team.group_sale_manager'))]"/>
|
|
</record>
|
|
|
|
<record id="crm_rule_own_salesteam" model="ir.rule">
|
|
<field name="name">Own Salesteam</field>
|
|
<field ref="sales_team.model_crm_team" name="model_id"/>
|
|
<field name="domain_force">[('member_ids', 'in', user.id)]</field>
|
|
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
|
|
</record>
|
|
|
|
<record id="crm_rule_all_salesteam" model="ir.rule">
|
|
<field name="name">All Salesteam</field>
|
|
<field ref="sales_team.model_crm_team" 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="sale_team_comp_rule">
|
|
<field name="name">Sales Team multi-company</field>
|
|
<field name="model_id" ref="model_crm_team"/>
|
|
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.menu" id="sales_team.menu_sale_config">
|
|
<field name="name">Configuration</field>
|
|
<field eval="[(6,0,[ref('base.group_system'), ref('base.group_partner_manager')])]" name="groups_id"/>
|
|
</record>
|
|
|
|
<record model="ir.ui.menu" id="menu_config_address_book">
|
|
<field name="name">Contacts</field>
|
|
<field eval="[(6,0,[ref('base.group_system'), ref('base.group_partner_manager')])]" name="groups_id"/>
|
|
</record>
|
|
</data>
|
|
</odoo>
|