[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#58747

X-original-commit: 811edc466edbe9fc4b22e6f140cb5601612404f1
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
Dhruv Patel
2020-09-28 19:11:11 +00:00
committed by Sébastien Theys
parent 00e7122a40
commit 2004847c15
+7
View File
@@ -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
# ------------------------------------------------------