From 9dc9fa01c9a438b18bb244d70feceb4f72056f6d Mon Sep 17 00:00:00 2001 From: "Jay Vora(SerpentCS)" Date: Fri, 18 Nov 2016 18:43:43 +0530 Subject: [PATCH 1/8] [MIG] Migration started web_notify --- web_notify/README.rst | 1 + web_notify/__manifest__.py | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) 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..968946a8 100644 --- a/web_notify/__manifest__.py +++ b/web_notify/__manifest__.py @@ -6,9 +6,11 @@ '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)', + 'author': """Serpent Consulting Services Pvt. Ltd., + ACSONE SA/NV, Odoo Community Association (OCA)""", 'website': 'https://acsone.eu/', 'depends': [ 'web', @@ -19,5 +21,5 @@ ], 'demo': [ ], - 'installable': False, + 'installable': True, } From 6a1ebe8e3d25bd46fa0d2e345e304044d74b0f3a Mon Sep 17 00:00:00 2001 From: "Jay Vora(SerpentCS)" Date: Fri, 18 Nov 2016 18:52:57 +0530 Subject: [PATCH 2/8] [MIG] Migration of web_notify --- web_notify/models/res_users.py | 3 +-- web_notify/static/src/js/web_client.js | 2 +- web_notify/tests/test_res_users.py | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/web_notify/models/res_users.py b/web_notify/models/res_users.py index 51147455..ec298978 100644 --- a/web_notify/models/res_users.py +++ b/web_notify/models/res_users.py @@ -2,8 +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..3a52312d 100644 --- a/web_notify/static/src/js/web_client.js +++ b/web_notify/static/src/js/web_client.js @@ -3,7 +3,7 @@ odoo.define('web_notify.WebClient', function (require) { var WebClient = require('web.WebClient'); var base_bus = require('bus.bus'); -var _ = require('_'); +//var _ = require('_'); WebClient.include({ init: function(parent, client_options){ 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) From 012b45c3bef0e86fd364c441224525f3965f9e6f Mon Sep 17 00:00:00 2001 From: "Jay Vora(SerpentCS)" Date: Fri, 18 Nov 2016 19:01:16 +0530 Subject: [PATCH 3/8] [MIG] Migration of web_notify --- web_notify/models/res_users.py | 1 + 1 file changed, 1 insertion(+) diff --git a/web_notify/models/res_users.py b/web_notify/models/res_users.py index ec298978..29f0eca1 100644 --- a/web_notify/models/res_users.py +++ b/web_notify/models/res_users.py @@ -4,6 +4,7 @@ from odoo import api, fields, models, _ + class ResUsers(models.Model): _inherit = 'res.users' From cd34dadaf26b677c4dba3a1e70e31c4dd9d5f933 Mon Sep 17 00:00:00 2001 From: "Adrien Peiffer (ACSONE)" Date: Wed, 23 Nov 2016 10:06:07 +0100 Subject: [PATCH 4/8] [ADD] Add setup.py --- setup/web_notify/odoo/__init__.py | 1 + setup/web_notify/odoo/addons/__init__.py | 1 + setup/web_notify/odoo/addons/web_notify | 1 + setup/web_notify/setup.py | 6 ++++++ 4 files changed, 9 insertions(+) create mode 100644 setup/web_notify/odoo/__init__.py create mode 100644 setup/web_notify/odoo/addons/__init__.py create mode 120000 setup/web_notify/odoo/addons/web_notify create mode 100644 setup/web_notify/setup.py 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, +) From 328d457d14cf758d43cc258155b79f922d250df8 Mon Sep 17 00:00:00 2001 From: "Adrien Peiffer (ACSONE)" Date: Wed, 23 Nov 2016 12:03:35 +0100 Subject: [PATCH 5/8] [FIX] Return result of super of show_application --- web_notify/static/src/js/web_client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web_notify/static/src/js/web_client.js b/web_notify/static/src/js/web_client.js index 3a52312d..825fc7d6 100644 --- a/web_notify/static/src/js/web_client.js +++ b/web_notify/static/src/js/web_client.js @@ -10,8 +10,9 @@ WebClient.include({ 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; From 5a2299e1a7111c121ff082b9668224f5026531ee Mon Sep 17 00:00:00 2001 From: Serpent Consulting Services Pvt Ltd Date: Fri, 25 Nov 2016 20:19:11 +0530 Subject: [PATCH 6/8] Update web_client.js --- web_notify/static/src/js/web_client.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web_notify/static/src/js/web_client.js b/web_notify/static/src/js/web_client.js index 3a52312d..7d842ece 100644 --- a/web_notify/static/src/js/web_client.js +++ b/web_notify/static/src/js/web_client.js @@ -3,7 +3,6 @@ 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){ @@ -50,4 +49,4 @@ WebClient.include({ } }); -}); \ No newline at end of file +}); From 66fd708c89b0bba0fd4c96fb3e6847fb09754811 Mon Sep 17 00:00:00 2001 From: Serpent Consulting Services Pvt Ltd Date: Fri, 25 Nov 2016 20:20:15 +0530 Subject: [PATCH 7/8] Update __manifest__.py --- web_notify/__manifest__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web_notify/__manifest__.py b/web_notify/__manifest__.py index 968946a8..dce3b917 100644 --- a/web_notify/__manifest__.py +++ b/web_notify/__manifest__.py @@ -9,8 +9,7 @@ 'version': '10.0.1.0.0', 'description': 'Web Notify', 'license': 'AGPL-3', - 'author': """Serpent Consulting Services Pvt. Ltd., - ACSONE SA/NV, Odoo Community Association (OCA)""", + 'author': """ACSONE SA/NV,Odoo Community Association (OCA)""", 'website': 'https://acsone.eu/', 'depends': [ 'web', From 3d615c1f8e9362945d86233c055f26a729e7b36f Mon Sep 17 00:00:00 2001 From: Serpent Consulting Services Pvt Ltd Date: Thu, 1 Dec 2016 14:54:59 +0530 Subject: [PATCH 8/8] Update __manifest__.py --- web_notify/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_notify/__manifest__.py b/web_notify/__manifest__.py index dce3b917..858c3be9 100644 --- a/web_notify/__manifest__.py +++ b/web_notify/__manifest__.py @@ -9,7 +9,7 @@ 'version': '10.0.1.0.0', 'description': 'Web Notify', 'license': 'AGPL-3', - 'author': """ACSONE SA/NV,Odoo Community Association (OCA)""", + 'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', 'website': 'https://acsone.eu/', 'depends': [ 'web',