diff options
| author | Andreas Perhab <andreas.perhab@wt-io-it.at> | 2019-04-17 07:47:40 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2019-05-29 10:02:18 +0000 |
| commit | 8242ddbc10ebf85035ebbfe49e9b488e1f5ffc9e (patch) | |
| tree | 6fd89a9370f579a1eb2ee3153fd1d7a5edf69cf5 /addons/website/controllers/main.py | |
| parent | 3e12f2ff56eaa4950fd14d1a4bb29e3721c0268a (diff) | |
[FIX] website: provide favicon for pdf tabs
When opening the pdf at the end of an order Chrome tries to load
/favicon.ico which returns 404 before this patch. We provide the
favicon from the current website.
closes odoo/odoo#33746
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/website/controllers/main.py')
| -rw-r--r-- | addons/website/controllers/main.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py index ead68c28274..872cbd6dee2 100644 --- a/addons/website/controllers/main.py +++ b/addons/website/controllers/main.py @@ -443,3 +443,8 @@ class WebsiteBinary(http.Controller): if unique: kw['unique'] = unique return Binary().content_image(**kw) + + @http.route(['/favicon.ico'], type='http', auth='public', website=True) + def favicon(self, **kw): + # when opening a pdf in chrome, chrome tries to open the default favicon url + return self.content_image(model='website', id=str(request.website.id), field='favicon', **kw) |
