diff options
| author | Dharmang Soni <dpr@openerp.com> | 2017-12-28 16:53:51 +0530 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2018-03-27 13:26:41 +0200 |
| commit | f488dc58c37fdc7fd49df759165de641e213444b (patch) | |
| tree | 58fd69511a6afcabb27f4a39a382353af0ca3a78 /addons/mail/data | |
| parent | 4265026ee23ab71e8b199a9d8cbbd439409d7a03 (diff) | |
[IMP] mail: allow to use stand alone activities as reminders
This commit allows to create personal reminders and to manage them using
activities. It is done using activities not necessarily linked to a record
but only to a user. Reminders can be used for example as a personal todo
list.
Technically we choose to model a reminder as an activity related to no
record. This means having a void res_id and model. An activity type is
added to classify reminders in it.
Settings reminder as done is not done like classic activities. Indeed classic
activities are unlinked and a message is logged on the related document.
As there is no document for reminders those are archived instead. It means
an active field is added as well as an override of toggle_archive to update
systray counter.
Activities systray widget is improved to display reminders in activities
list. This entry leads to a kanban view of activities allowing their
management. It is also possible to create them directly from the systray
allowing a quick creation of reminders.
This commit is related to task ID 41745. Closes #22143 .
Co-authored-by: Dharmang Soni <dpr@odoo.com>
Co-authored-by: Xavier Dollé <xdo@odoo.com>
Diffstat (limited to 'addons/mail/data')
| -rw-r--r-- | addons/mail/data/mail_activity_data.xml | 6 | ||||
| -rw-r--r-- | addons/mail/data/mail_activity_demo.xml | 10 | ||||
| -rw-r--r-- | addons/mail/data/mail_demo.xml | 1 |
3 files changed, 16 insertions, 1 deletions
diff --git a/addons/mail/data/mail_activity_data.xml b/addons/mail/data/mail_activity_data.xml index 281d1915141..79f01eeaf02 100644 --- a/addons/mail/data/mail_activity_data.xml +++ b/addons/mail/data/mail_activity_data.xml @@ -19,5 +19,11 @@ <field name="icon">fa-tasks</field> <field name="days">5</field> </record> + <record id="mail_activity_data_reminder" model="mail.activity.type"> + <field name="name">Reminder</field> + <field name="category">reminder</field> + <field name="icon">fa-tasks</field> + <field name="days">0</field> + </record> </data> </odoo> diff --git a/addons/mail/data/mail_activity_demo.xml b/addons/mail/data/mail_activity_demo.xml new file mode 100644 index 00000000000..f15a84331d4 --- /dev/null +++ b/addons/mail/data/mail_activity_demo.xml @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<odoo> + <data noupdate="1"> + <record id="mail_activity_reminder_0" model="mail.activity"> + <field name="note" type="html"><p>Lunch with colleagues this Sunday.</p></field> + <field name="user_id" ref="base.user_root"/> + <field name="active" eval="True"/> + </record> + </data> +</odoo>
\ No newline at end of file diff --git a/addons/mail/data/mail_demo.xml b/addons/mail/data/mail_demo.xml index 0aa8d664ab8..b4e7f2c092e 100644 --- a/addons/mail/data/mail_demo.xml +++ b/addons/mail/data/mail_demo.xml @@ -220,6 +220,5 @@ virginie@agrolait.fr</pre></field> <field name="partner_ids" eval="[(6, 0, [ref('base.partner_root')])]"/> <field name="date" eval="(DateTime.today() - timedelta(minutes=1)).strftime('%Y-%m-%d %H:%M')"/> </record> - </data> </odoo> |
