summaryrefslogtreecommitdiff
path: root/addons/mail/data/mail_activity_data.xml
diff options
context:
space:
mode:
authorRavi Gadhia <rga@odoo.com>2016-11-17 12:54:15 +0100
committerThibault Delavallée <tde@odoo.com>2016-12-21 10:56:15 +0100
commit60bacefd01437999c6c7f03a92a78df3857f39c1 (patch)
tree1caf83e2322d02b5cbe194fe2aa3a23aea068a96 /addons/mail/data/mail_activity_data.xml
parent936bc35820135d08432bbe6a9fd8201cf71c3944 (diff)
[IMP] mail: add activities allowing to define next actions on various models
This commit introduces generic activities to use in your addons. Activities are actions user have to take on a document like making a phonecall or organizing a meeting. Activities come with the mail module as they are integrated in the Chatter but are not bundled with mail.thread. New models are * mail.activity.type: used to categorize activities. Each type is a different kind of activity e.g. call, mail, meeting. An activity can be generic i.e. available for all models using activities; or specific to a model in which case res_model_id field should be used. * mail.activity: an actual activity to perform. Activities are linked to documents using res_id and res_model_id fields. Activities have a deadline that can be used in kanban view to display a status. Once done activities are unlinked and a message is posted. This message has a new activity_type_id field that indicates the activity linked to the message. This commit introduces a mail.activity mixin to use in various addons that enables the activities feature. It works like the mail.thread mixin. It defines a activity_ids one2many field toward activities using res_id and res_model_id. Various related / computed fields are also added to have a global status of activities on documents. Activities come with a new JS widget for the form view. It is integrated in the Chatter widget although it is a separate widget. It displays activities linked to the current record and allow to schedule, edit and mark done activities. Use widget="mail_activity" on activity_ids field in form view to use it. There is also a kanban widget defined. It defines a small widget to integrate in kanban vignettes. It allow to manage activities directly from the kanban view. Use widget="kanban_activity" on activitiy_ids field in kanban view to use it. Next commits will aim at integrating activities inside main Odoo addons. Thanks to R&D India for their work and testing on this task. Thanks to belgian Usabiliteam for reviewing and testing it. Thanks to @jem-odoo for the final review. May his soul lie in peace with the trumpets of paradise.
Diffstat (limited to 'addons/mail/data/mail_activity_data.xml')
-rw-r--r--addons/mail/data/mail_activity_data.xml27
1 files changed, 27 insertions, 0 deletions
diff --git a/addons/mail/data/mail_activity_data.xml b/addons/mail/data/mail_activity_data.xml
new file mode 100644
index 00000000000..8e9a213dcff
--- /dev/null
+++ b/addons/mail/data/mail_activity_data.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data noupdate="1">
+ <record id="mail_activity_data_email" model="mail.activity.type">
+ <field name="name">Email</field>
+ <field name="icon">fa-envelope</field>
+ <field name="summary">Send an Email</field>
+ </record>
+ <record id="mail_activity_data_call" model="mail.activity.type">
+ <field name="name">Call</field>
+ <field name="icon">fa-phone</field>
+ <field name="summary">Make a Call</field>
+ <field name="days">2</field>
+ </record>
+ <record id="mail_activity_data_meeting" model="mail.activity.type">
+ <field name="name">Meeting</field>
+ <field name="icon">fa-users</field>
+ <field name="summary">Reminder for meeting</field>
+ </record>
+ <record id="mail_activity_data_todo" model="mail.activity.type">
+ <field name="name">Todo</field>
+ <field name="icon">fa-tasks</field>
+ <field name="summary">Task to perform</field>
+ <field name="days">5</field>
+ </record>
+ </data>
+</odoo>