2017-08-09 14:55:17 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<odoo>
|
|
|
|
<data>
|
|
|
|
|
|
|
|
<!-- Forms -->
|
|
|
|
<record id="crm_action_form" model="ir.ui.view">
|
|
|
|
<field name="name">CRM Action Form</field>
|
|
|
|
<field name="model">crm.action</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form string="Actions">
|
|
|
|
<header>
|
|
|
|
<button name="create_linked_event" string="Create linked event"
|
|
|
|
type="object" class="oe_highlight"
|
|
|
|
attrs="{'invisible': ['|', (['event_id', '!=', False]),
|
|
|
|
('state', '=', 'cancel')]}" />
|
|
|
|
<button name="remove_linked_event" string="Remove linked event"
|
|
|
|
type="object" class="oe_highlight"
|
|
|
|
attrs="{'invisible': [(['event_id', '=', False])]}" />
|
2017-10-29 11:08:14 +01:00
|
|
|
<field name="state" widget="statusbar" clickable="1" />
|
2017-08-09 14:55:17 +02:00
|
|
|
</header>
|
|
|
|
<sheet>
|
|
|
|
<group>
|
|
|
|
<field name="action_type_id" />
|
|
|
|
<field name="date" />
|
|
|
|
<field name="event_id" readonly="1"
|
|
|
|
attrs="{'invisible': [('event_id', '=', False)]}" />
|
|
|
|
<field name="priority" widget="priority" />
|
|
|
|
<field name="details" width="200" />
|
|
|
|
<field name="lead_id" />
|
|
|
|
<field name="partner_id" />
|
|
|
|
<field name="user_id" />
|
|
|
|
</group>
|
|
|
|
</sheet>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
<record id="crm_action_type_form" model="ir.ui.view">
|
|
|
|
<field name="name">CRM Action Type Form</field>
|
|
|
|
<field name="model">crm.action.type</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form>
|
|
|
|
<sheet>
|
|
|
|
<group>
|
|
|
|
<field name="name" />
|
|
|
|
<field name="priority" />
|
2017-08-09 15:50:25 +02:00
|
|
|
<field name="active" />
|
2017-08-09 14:55:17 +02:00
|
|
|
</group>
|
|
|
|
</sheet>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<!-- Trees -->
|
|
|
|
<record id="crm_action_tree" model="ir.ui.view">
|
|
|
|
<field name="name">CRM Action Tree</field>
|
|
|
|
<field name="model">crm.action</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<tree colors="red:date < current_date and state=='draft';blue:date >= current_date and state=='draft';gray: state == 'cancel'">
|
|
|
|
<field name="action_type_id" />
|
|
|
|
<field name="priority" />
|
|
|
|
<field name="date" />
|
|
|
|
<field name="lead_id" />
|
|
|
|
<field name="partner_id" />
|
|
|
|
<field name="user_id" />
|
2017-11-23 07:12:16 +01:00
|
|
|
<button icon="fa-check" name="set_to_done" type="object"
|
2017-08-09 14:55:17 +02:00
|
|
|
string="Mark as Done" states="draft" />
|
2017-08-09 15:50:25 +02:00
|
|
|
<button icon="fa-undo" name="set_to_draft" type="object"
|
2017-08-09 14:55:17 +02:00
|
|
|
string="Back to Todo" states="done" />
|
|
|
|
<field name="state" />
|
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
<record id="crm_action_type_tree" model="ir.ui.view">
|
|
|
|
<field name="name">CRM Action Type Tree</field>
|
|
|
|
<field name="model">crm.action.type</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<tree editable="top">
|
|
|
|
<field name="name"/>
|
|
|
|
<field name="priority"/>
|
|
|
|
<field name="active"/>
|
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2017-08-09 15:50:25 +02:00
|
|
|
<!-- Calendars -->
|
|
|
|
<record id="crm_action_calendar" model="ir.ui.view">
|
|
|
|
<field name="name">CRM Action Calendar</field>
|
|
|
|
<field name="model">crm.action</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<calendar string="Actions" color="user_id" date_start="date">
|
|
|
|
<field name="partner_id" />
|
2017-08-09 17:07:49 +02:00
|
|
|
<field name="display_name" />
|
2017-08-09 15:50:25 +02:00
|
|
|
</calendar>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
|
2017-08-09 14:55:17 +02:00
|
|
|
<!-- Searches -->
|
|
|
|
<record model="ir.ui.view" id="crm_action_search">
|
|
|
|
<field name="name">Search adaptations</field>
|
|
|
|
<field name="model">crm.action</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<search string="Search Actions">
|
|
|
|
<field name="lead_id" />
|
|
|
|
<field name="partner_id" />
|
|
|
|
<field name="date" />
|
|
|
|
<field name="user_id" />
|
|
|
|
<separator/>
|
|
|
|
<filter string="Todo" name="draft_only"
|
|
|
|
domain="[('state', '=', 'draft')]"/>
|
|
|
|
<filter string="Done" name="done_only"
|
|
|
|
domain="[('state', '=', 'done')]"/>
|
|
|
|
<separator />
|
|
|
|
<filter name="urgent" string="Urgent"
|
|
|
|
domain="[('priority', '=', '4')]" />
|
|
|
|
<separator/>
|
|
|
|
<filter string="Todo Today" name="todo_today"
|
|
|
|
domain="[('state', '=', 'draft'), ('date', '<=', context_today().strftime('%Y-%m-%d'))]" />
|
|
|
|
<filter name="todo_week" string="Todo within 7 days"
|
|
|
|
domain="[('state', '=', 'draft'), ('date', '<=', (context_today() + datetime.timedelta(days=7)).strftime('%Y-%m-%d'))]" />
|
|
|
|
<filter name="todo_month" string="Todo within 30 days"
|
|
|
|
domain="[('state', '=', 'draft'), ('date', '<=', (context_today() + datetime.timedelta(days=30)).strftime('%Y-%m-%d'))]" />
|
|
|
|
<separator/>
|
|
|
|
<filter string="My Actions" name="user_me"
|
|
|
|
domain="[('user_id', '=', uid)]" help="Actions done by me" />
|
|
|
|
<group string="Group By" name="groupby">
|
|
|
|
<filter name="state_groupby" string="State"
|
|
|
|
context="{'group_by': 'state'}" />
|
|
|
|
<filter name="priority_groupby" string="Priority"
|
|
|
|
context="{'group_by': 'priority'}" />
|
|
|
|
<filter name="partner_groupby" string="Partner"
|
|
|
|
context="{'group_by': 'partner_id'}" />
|
|
|
|
<filter name="user_groupby" string="User"
|
|
|
|
context="{'group_by': 'user_id'}" />
|
|
|
|
<filter name="action_type_id_groupby" string="Action Type"
|
|
|
|
context="{'group_by': 'action_type_id'}" />
|
|
|
|
<filter name="date_groupby" string="Week"
|
|
|
|
context="{'group_by': 'date:week'}"/>
|
|
|
|
</group>
|
|
|
|
</search>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
<record id="crm_action_type_search" model="ir.ui.view">
|
|
|
|
<field name="name">CRM Action Type Search</field>
|
|
|
|
<field name="model">crm.action.type</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<search string="Search Action Types">
|
|
|
|
<field name="name" />
|
|
|
|
</search>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<!-- Actions -->
|
|
|
|
<record model="ir.actions.act_window" id="crm_action_action">
|
|
|
|
<field name="name">Actions</field>
|
|
|
|
<field name="res_model">crm.action</field>
|
|
|
|
<field name="view_mode">tree,form,calendar</field>
|
|
|
|
<field name="context">{'search_default_draft_only': 1, 'search_default_user_me': 1}</field>
|
|
|
|
</record>
|
|
|
|
<record id="crm_action_type_action" model="ir.actions.act_window">
|
|
|
|
<field name="name">Action Types</field>
|
|
|
|
<field name="res_model">crm.action.type</field>
|
|
|
|
<field name="view_mode">tree</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<!-- Menus -->
|
2017-10-29 11:10:08 +01:00
|
|
|
<record id="crm.crm_activity_menu" model="ir.ui.menu">
|
|
|
|
<field name="active">0</field>
|
|
|
|
</record>
|
2017-08-09 14:55:17 +02:00
|
|
|
<record id="crm.crm_lead_menu_activities" model="ir.ui.menu">
|
|
|
|
<field name="active">0</field>
|
|
|
|
</record>
|
|
|
|
<menuitem id="crm_action_menu" name="Actions"
|
|
|
|
parent="sales_team.menu_sales" sequence="5" action="crm_action_action" />
|
|
|
|
<menuitem id="crm_action_type_menu" name="Action Types"
|
|
|
|
action="crm_action_type_action" sequence="0"
|
|
|
|
parent="crm.menu_crm_config_lead" />
|
|
|
|
|
|
|
|
</data>
|
|
|
|
</odoo>
|