From 60bacefd01437999c6c7f03a92a78df3857f39c1 Mon Sep 17 00:00:00 2001 From: Ravi Gadhia Date: Thu, 17 Nov 2016 12:54:15 +0100 Subject: [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. --- addons/mail/data/mail_activity_data.xml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 addons/mail/data/mail_activity_data.xml (limited to 'addons/mail/data/mail_activity_data.xml') 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 @@ + + + + + Email + fa-envelope + Send an Email + + + Call + fa-phone + Make a Call + 2 + + + Meeting + fa-users + Reminder for meeting + + + Todo + fa-tasks + Task to perform + 5 + + + -- cgit v1.2.3