diff options
| author | Dhruv Patel <dhp@odoo.com> | 2020-05-29 06:31:06 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2020-09-28 18:46:20 +0000 |
| commit | e1804f033c18ea6918b00a73db397dcd28055f4e (patch) | |
| tree | 2d5d60a5913fbc8d4096f2957a57e134f4657c41 | |
| parent | 30744856a4a215527024c9cd730708cee58f471a (diff) | |
[FIX] mail: activities without summary added display false in export
Currently, activities having blank summary field exported in xls or csv display
False. Instead of that, need to display the activity type like Email, To Do,
Call, Meeting, etc. as its display in the list view.
With this commit, if the activity type has summary then it will display summary
value otherwise it will display the activity type name if summary is not added.
Task : 2254851
closes odoo/odoo#58742
X-original-commit: 811edc466edbe9fc4b22e6f140cb5601612404f1
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
| -rw-r--r-- | addons/mail/models/mail_activity.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/mail/models/mail_activity.py b/addons/mail/models/mail_activity.py index e9a12639423..f79d0c44a11 100644 --- a/addons/mail/models/mail_activity.py +++ b/addons/mail/models/mail_activity.py @@ -406,6 +406,13 @@ class MailActivity(models.Model): {'type': 'activity_updated', 'activity_deleted': True}) return super(MailActivity, self).unlink() + def name_get(self): + res = [] + for record in self: + name = record.summary or record.activity_type_id.display_name + res.append((record.id, name)) + return res + # ------------------------------------------------------ # Business Methods # ------------------------------------------------------ |
