diff options
| author | Jérome Maes <jem@openerp.com> | 2015-10-01 17:15:01 +0200 |
|---|---|---|
| committer | Jérome Maes <jem@openerp.com> | 2015-10-06 09:43:46 +0200 |
| commit | 22631a152a1d242eefd9454857773039f58570bd (patch) | |
| tree | 4eb3dbdb2bcc937b0eb7929ff50017f9396e2955 /addons/website_mail/controllers/main.py | |
| parent | a4b17c262107091ede3c59e8c9cfa0b9f544a593 (diff) | |
[FIX] mail, website_mail : special controller for message author avatar
Previous commit (3304b31938a5f9189ba0e1966cf2e31ef129b2cf) was not performant enough for AL, so got special autorization to make a particular controller for mail.message author avatar. Avatar of message is avaiblable if current user has 'read' access right to the document. Otherwise the default avatar is one white pixel.
Diffstat (limited to 'addons/website_mail/controllers/main.py')
| -rw-r--r-- | addons/website_mail/controllers/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_mail/controllers/main.py b/addons/website_mail/controllers/main.py index 5ae3b6a0734..a71d25dea51 100644 --- a/addons/website_mail/controllers/main.py +++ b/addons/website_mail/controllers/main.py @@ -157,7 +157,7 @@ class WebsiteMail(http.Controller): 'body': msg.body, 'date': msg.date, 'author': msg.author_id.name, - 'image_url': request.website.image_url(msg.author_id, 'image_small') + 'image_url': '/mail/%s/%s/avatar/%s' % (msg.model, msg.res_id, msg.author_id.id) } return data except Exception: |
