Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
865 Vistas

Hello,

i added a pivot view on model mail.message and it works very well

But i'm facing a problem because it doesn't work for every user.

For some of them, there is the following message :
"Only administrators are allowed to use grouped read on message model"


If i give admin right to these users, this message disapear but i can't give admin rights to everybody of course.

Is anybody knows how to allowed every user to see my pivot view on mail.message model?

Other thing, i tried to find this message in Odoo to see the condition for its display but never found it, neither in translation nor in code!!!

Thanks in advance

Vincent

Avatar
Descartar
Mejor respuesta

The exception is defined in code of mail.message model.

    @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
Descartar