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.
28 lines
1.1 KiB
XML
28 lines
1.1 KiB
XML
<?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>
|