Files
odoo_source/addons/sales_team/data/sales_team_data.xml
T
Nicolas Lempereur 3ad1867ea4 [FIX] sales_team: get good team in multi company
When getting the default sales team, we could get erroneously the
team of another company (either because the use is in a team of another
company or the default sales team was in non-bethren company).

This fix when searching a sales team:

- search only teams the user should see (with access rules)
- make default teams "Website Sales" and "Direct Sales" not restricted
  to one company (and it's ancestors).

opw-726461
2017-04-04 17:57:07 +02:00

24 lines
860 B
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record model="crm.team" id="team_sales_department">
<field name="name">Direct Sales</field>
<field name="member_ids" eval="[(4, ref('base.user_root'))]"/>
<field name="company_id" eval="False"/>
</record>
<record model="crm.team" id="salesteam_website_sales">
<field name="name">Website Sales</field>
<field name="company_id" eval="False"/>
</record>
</data>
<record model="res.groups" id="sales_team.group_sale_salesman">
<field name="category_id" ref="base.module_category_sales_management"/>
</record>
<record model="res.groups" id="sales_team.group_sale_manager">
<field name="category_id" ref="base.module_category_sales_management"/>
</record>
</odoo>