odoo/addons/sales_team/views/crm_team_views.xml

200 lines
11 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<menuitem name="Sales"
id="menu_base_partner"
groups="group_sale_salesman,group_sale_manager" sequence="6"/>
<menuitem id="menu_sales" name="Sales" parent="menu_base_partner" sequence="5"/>
<menuitem id="menu_partner_form" parent="menu_sales" action="base.action_partner_form" sequence="3"/>
<menuitem id="menu_sale_config" name="Configuration" parent="menu_base_partner"
sequence="100" groups="group_sale_manager"/>
<menuitem id="menu_sale_general_settings" name="Settings" parent="menu_sale_config"
sequence="0" action="action_sale_config" groups="base.group_system"/>
<menuitem id="menu_config_address_book" parent="menu_sale_config" name="Contacts" sequence="4" groups="base.group_system"/>
<menuitem action="base.action_partner_category_form" id="menu_partner_category_form" name="Contact Tags" sequence="1" parent="menu_config_address_book" groups="base.group_no_one"/>
<menuitem action="base.action_partner_title_contact" id="menu_partner_title_contact" name="Contact Titles" parent="menu_config_address_book" sequence="3" groups="base.group_no_one"/>
<menuitem id="menu_localisation" name="Localization" parent="menu_config_address_book" sequence="5" groups="base.group_no_one"/>
<menuitem action="base.action_country" id="menu_country_partner" parent="menu_localisation" sequence="1" groups="base.group_no_one"/>
<menuitem action="base.action_country_group" id="menu_country_group" name="Country Group" parent="menu_localisation" sequence="3" groups="base.group_no_one"/>
<menuitem action="base.action_country_state" id="menu_country_state_partner" parent="menu_localisation" sequence="2" groups="base.group_no_one"/>
<menuitem action="base.action_currency_form" id="menu_action_currency_form" parent="menu_localisation" sequence="3" groups="base.group_multi_currency"/>
<menuitem id="menu_config_bank_accounts" name="Bank Accounts" parent="menu_config_address_book" sequence="6" groups="base.group_no_one"/>
<menuitem action="base.action_res_bank_form" id="menu_action_res_bank_form" parent="menu_config_bank_accounts" sequence="1" groups="base.group_no_one"/>
<menuitem action="base.action_res_partner_bank_account_form" id="menu_action_res_partner_bank_form" parent="menu_config_bank_accounts" groups="base.group_no_one" sequence="2"/>
<!-- Cateamions Search view -->
<record id="crm_team_salesteams_search" model="ir.ui.view">
<field name="name">Case Teams - Search</field>
<field name="model">crm.team</field>
<field name="arch" type="xml">
<search string="Salesteams Search">
<filter name="personal" string="My Salesteams" domain="['|', ('member_ids', '=', uid), ('user_id', '=', uid)]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<field name="name"/>
<field name="user_id"/>
<group expand="0" string="Group By...">
<filter string="Team Leader" domain="[]" context="{'group_by':'user_id'}"/>
</group>
</search>
</field>
</record>
<!-- Case Teams Action -->
<record id="crm_team_salesteams_act" model="ir.actions.act_window">
<field name="name">Dashboard</field>
<field name="res_model">crm.team</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,form</field>
<field name="context">{}</field>
<field name="view_id" ref="crm_team_salesteams_search"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click here to define a new sales team.
</p><p>
Use sales team to organize your different salespersons or
departments into separate teams. Each team will work in
its own list of opportunities.
</p>
</field>
</record>
<!-- Case Teams Form View -->
<record id="crm_team_view_form" model="ir.ui.view">
<field name="name">crm.team.form</field>
<field name="model">crm.team</field>
<field name="arch" type="xml">
<form string="Sales Team">
<sheet>
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
</button>
</div>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Sales team"/>
<h1>
<field name="name" placeholder="Salesteam name..."/>
</h1>
<div name="options_active"/>
</div>
<group>
<group name="left">
<field name="user_id" domain="[('share', '=', False)]"/>
</group>
<group name="right">
</group>
</group>
<notebook>
<page name="members" string="Team Members">
<field name="member_ids" widget="many2many_kanban" options="{'not_delete': True}">
<kanban quick_create="false" create="true" delete="true">
<field name="name"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click" style="position: relative">
<a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
<div class="oe_module_vignette">
<img t-att-src="kanban_image('res.users', 'image_small', record.id.value)" class="oe_avatar oe_kanban_avatar_smallbox"/>
<div class="oe_module_desc">
<field name="name"/>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</page>
<page string="More Info" name="more_info" groups="base.group_no_one">
<group string="Company" groups="base.group_multi_company">
<field name="company_id" options="{'no_create': True}"/>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" help="Follow this salesteam to automatically track the events associated to users of this team."/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<!-- Case Teams Tree View -->
<record id="crm_team_view_tree" model="ir.ui.view">
<field name="name">crm.team.tree</field>
<field name="model">crm.team</field>
<field name="field_parent">child_ids</field>
<field name="arch" type="xml">
<tree string="Sales Team">
<field name="name"/>
<field name="active" invisible="1"/>
<field name="user_id"/>
</tree>
</field>
</record>
<record id="crm_team_act" model="ir.actions.act_window">
<field name="name">Sales Teams</field>
<field name="res_model">crm.team</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm_team_view_tree"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click here to define a new sales team.
</p><p>
Use sales team to organize your different salespersons or
departments into separate teams. Each team will work in
its own list of opportunities.
</p>
</field>
</record>
<menuitem id="sales_team.menu_sales_team_act" action="crm_team_salesteams_act" sequence="1" parent="sales_team.menu_base_partner" name="Dashboard"/>
<!-- add css / js -->
<template id="assets_backend" name="sales_team assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/sales_team/static/src/css/sales_team.css"/>
<link rel="stylesheet" href="/sales_team/static/src/less/sales_team_dashboard.less"/>
<script type="text/javascript" src="/sales_team/static/src/js/sales_team.js"></script>
<script type="text/javascript" src="/sales_team/static/src/js/sales_team_dashboard.js"></script>
</xpath>
</template>
<menuitem id="menu_sale_report" name="Reports" parent="sales_team.menu_base_partner" sequence="99" groups="sales_team.group_sale_manager"/>
<record id="sales_team_config_action" model="ir.actions.act_window">
<field name="name">Sales Teams</field>
<field name="res_model">crm.team</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{}</field>
<field name="view_id" ref="crm_team_salesteams_search"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click here to define a new sales team.
</p><p>
Use sales team to organize your different salespersons or
departments into separate teams. Each team will work in
its own list of opportunities.
</p>
</field>
</record>
<menuitem name="Sales Teams"
id="sales_team_config"
parent="sales_team.menu_sale_config"
action="sales_team_config_action"/>
</data>
</odoo>