diff --git a/setup/web_notify/odoo/__init__.py b/setup/web_notify/odoo/__init__.py new file mode 100644 index 00000000..de40ea7c --- /dev/null +++ b/setup/web_notify/odoo/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/setup/web_notify/odoo/addons/__init__.py b/setup/web_notify/odoo/addons/__init__.py new file mode 100644 index 00000000..de40ea7c --- /dev/null +++ b/setup/web_notify/odoo/addons/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/setup/web_notify/odoo/addons/web_notify b/setup/web_notify/odoo/addons/web_notify new file mode 120000 index 00000000..f778fe73 --- /dev/null +++ b/setup/web_notify/odoo/addons/web_notify @@ -0,0 +1 @@ +../../../../web_notify \ No newline at end of file diff --git a/setup/web_notify/setup.py b/setup/web_notify/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/web_notify/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/web_notify/README.rst b/web_notify/README.rst index f24f58fe..81922055 100644 --- a/web_notify/README.rst +++ b/web_notify/README.rst @@ -63,6 +63,7 @@ Contributors ------------ * Laurent Mignon +* Serpent Consulting Services Pvt. Ltd. Maintainer ---------- diff --git a/web_notify/__manifest__.py b/web_notify/__manifest__.py index d14635e2..858c3be9 100644 --- a/web_notify/__manifest__.py +++ b/web_notify/__manifest__.py @@ -6,7 +6,8 @@ 'name': 'Web Notify', 'summary': """ Send notification messages to user""", - 'version': '9.0.1.0.0', + 'version': '10.0.1.0.0', + 'description': 'Web Notify', 'license': 'AGPL-3', 'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', 'website': 'https://acsone.eu/', @@ -19,5 +20,5 @@ ], 'demo': [ ], - 'installable': False, + 'installable': True, } diff --git a/web_notify/models/res_users.py b/web_notify/models/res_users.py index 51147455..29f0eca1 100644 --- a/web_notify/models/res_users.py +++ b/web_notify/models/res_users.py @@ -2,7 +2,7 @@ # Copyright 2016 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from openerp import api, fields, models, _ +from odoo import api, fields, models, _ class ResUsers(models.Model): diff --git a/web_notify/static/src/js/web_client.js b/web_notify/static/src/js/web_client.js index 3c908a07..1ee99224 100644 --- a/web_notify/static/src/js/web_client.js +++ b/web_notify/static/src/js/web_client.js @@ -3,15 +3,15 @@ odoo.define('web_notify.WebClient', function (require) { var WebClient = require('web.WebClient'); var base_bus = require('bus.bus'); -var _ = require('_'); WebClient.include({ init: function(parent, client_options){ this._super(parent, client_options); }, show_application: function() { - this._super(); + var res = this._super(); this.start_polling(); + return res }, on_logout: function() { var self = this; @@ -50,4 +50,4 @@ WebClient.include({ } }); -}); \ No newline at end of file +}); diff --git a/web_notify/tests/test_res_users.py b/web_notify/tests/test_res_users.py index f6751fed..a6f8087f 100644 --- a/web_notify/tests/test_res_users.py +++ b/web_notify/tests/test_res_users.py @@ -2,8 +2,8 @@ # Copyright 2016 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from openerp.tests import common -from openerp.addons.bus.models.bus import json_dump +from odoo.tests import common +from odoo.addons.bus.models.bus import json_dump import mock @@ -42,7 +42,7 @@ class TestResUsers(common.TransactionCase): def test_notify_many(self): # check that the notification of a list of users is done with # a single call to the bus - with mock.patch('openerp.addons.bus.models.bus.ImBus.sendmany' + with mock.patch('odoo.addons.bus.models.bus.ImBus.sendmany' ) as mockedSendMany: users = self.env.user.search([(1, "=", 1)]) self.assertTrue(len(users) > 1)