Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
854 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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,
)

Ảnh đại diện
Huỷ bỏ