Skip to Content
Menu
This question has been flagged
1 Reply
1553 Views

Add custom field in group_by in crm activity report.

Avatar
Discard
Author
from odoo import fields, models

class ActivityReport(models.Model):
_inherit = 'crm.activity.report'

tag_ids = fields.Many2many(
'crm.tag', 'Tags', readonly=True)

def _select(self):
return super(ActivityReport, self)._select() + ", l.tag_ids as tag_ids"


crm.activity.report.search.inherited
crm.activity.report


I have tried like this but it is not working, can you please find alternate solution for this.

Best Answer

To add tag_ids in group by of crm.activity.report you have to create a new field for crm.activity.report and to add it in group by add the filter for tag_ids as below:

I hope this will be helpful.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Avatar
Discard

Code :-
<filter string="Tags" name="tag_ids" context="{'group_by': 'tag_ids'}"/>