This question has been flagged
2 Replies
2920 Views

Dear all,

Using Odoo Studio, I’ve created an app to let salesmen view how many called have been placed per day, per person.

This uses the following context :

{'group_by': ['date:week', 'date:day', 'author_id']}


In the following domain

["&",["body","ilike","Appel Sortant"],["date",">","2020-12-31 23:00:00"]]


It used to work properly until now. Non admin users have this new message :

Only administrators are allowed to use grouped read on message model

I didn’t change the authorizations on message model, and I can’t find how to access this particular "grouped read" thing in the Access Rights section nor in the Record Rules section.

Can you please help me to the right direction to solve this ?

Thanks a lot,

best


Avatar
Discard
Best Answer

Hello,
The exception is defined in code of mail.message model.
You can override it (if you know what you are doing).

    @api.model
def _read_group_raw(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True):
if not self.env.is_admin():
raise AccessError(_("Only administrators are allowed to use grouped read on message model"))

return super(Message, self)._read_group_raw(
domain=domain, fields=fields, groupby=groupby, offset=offset,
limit=limit, orderby=orderby, lazy=lazy,
)

Avatar
Discard
Best Answer

Hello Maximilien,

Have you find any solution for your problem because i'm facing the same one and find no solution for the moment ?

Vincent

Avatar
Discard