mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-20 15:12:02 +02:00
19.0 vanilla
This commit is contained in:
parent
d1963a3c3a
commit
2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions
19
odoo-bringout-oca-ocb-mail/mail/controllers/webmanifest.py
Normal file
19
odoo-bringout-oca-ocb-mail/mail/controllers/webmanifest.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo.http import request
|
||||
from odoo.tools import file_open
|
||||
from odoo.addons.web.controllers import webmanifest
|
||||
|
||||
|
||||
class WebManifest(webmanifest.WebManifest):
|
||||
|
||||
def _get_service_worker_content(self):
|
||||
body = super()._get_service_worker_content()
|
||||
|
||||
# Add notification support to the service worker if user but no public
|
||||
if request.env.user._is_internal():
|
||||
with file_open('mail/static/src/service_worker.js') as f:
|
||||
body += f.read()
|
||||
|
||||
return body
|
||||
Loading…
Add table
Add a link
Reference in a new issue