Files
Pierre-Yves Dufays b6c236df54 [IMP] {test_}mail: allow to keep done activities and improve activity view
We add the option to keep the completed activities to allow the user to keep
track of the past action, especially the uploaded files which are displayed
along the completed activities. This feature can be activated per activity
type and is disabled by default.

We also improve the activity view to give a better overview of what has been
done and what is still to be done and by whom.

We also add tests for those new features:
- check activity data for the views (server-side test)

* Details about the activity view improvements:

** Improvement of the column header:

- progressbar: previously, only visible activities were counted in the
progression bar. Now all are counted.
- activity counter: instead of displaying the total count (next to the
progression bar), we display now a ratio as 2 numbers (only if keep done is
enabled):

** Improvement of the activity cells:

- add assignees in activity cells of activity view (limit to 2 having the
activity with closest deadline, if more a + is displayed). Note: to avoid
spacing between avatar, we add the optional props noSpacing to the avatar
component.
- add done activity in activity cell popover
- increase by 50% the popover height
- display done activity cell in grey
- instead of displaying the activity count if greater than 1, we display a
ratio ongoing / activity count. Note: we don't display the denominator if all
activities are done or all are ongoing.

** Progress bar filter

The activity filter is slighly modified. Previously, when clicking on a color
of the progress bar, all cell with a different color where hidden (ex.: if we
were clicking on the green area to filter planned activities, red cell which
represents overdue activities were hidden even if there was also a planned
activities for this record and activity type). Now we also display cells with
other "color" if there exist for that record and that type an activity
corresponding to the filtered "color".

Technical note: mail_activity.get_activity_data returns now for the activity
types a list of dictionary instead of a list of list. This simplifies the
reading as we can now uses name instead of index (type[1] becomes type.name
for example).

Task-3300854

Part-of: odoo/odoo#138135
2023-10-19 19:08:12 +00:00

47 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="mail_act_test_todo" model="mail.activity.type">
<field name="name">Do Stuff</field>
<field name="summary">Really?! Wow! A superpowers drug you can just rub onto your skin?</field>
<field name="category">default</field>
<field name="res_model">mail.test.activity</field>
</record>
<record id="mail_act_test_meeting" model="mail.activity.type">
<field name="name">Meet People</field>
<field name="summary">You'd think it would be something you'd have to freebase. Noooooo!</field>
<field name="category">default</field>
<field name="res_model">mail.test.activity</field>
</record>
<record id="mail_act_test_call" model="mail.activity.type">
<field name="name">Call People</field>
<field name="summary">Then throw her in the laundry room, which will hereafter be referred to as "the brig".</field>
<field name="category">default</field>
<field name="res_model">mail.test.activity</field>
</record>
<record id="mail_act_test_chained_2" model="mail.activity.type">
<field name="name">Step 2</field>
<field name="summary">Take the second step.</field>
<field name="category">default</field>
<field name="res_model">mail.test.activity</field>
<field name="delay_count">10</field>
<field name="delay_from">current_date</field>
<field name="delay_unit">days</field>
</record>
<record id="mail_act_test_chained_1" model="mail.activity.type">
<field name="name">Step 1</field>
<field name="summary">Take the first step.</field>
<field name="category">default</field>
<field name="res_model">mail.test.activity</field>
<field name="chaining_type">trigger</field>
<field name="triggered_next_type_id" ref="test_mail.mail_act_test_chained_2"/>
</record>
<record id="mail_act_test_upload_document" model="mail.activity.type">
<field name="name">Upload Document</field>
<field name="delay_count">5</field>
<field name="category">upload_file</field>
<field name="res_model">mail.test.activity</field>
</record>
</odoo>