mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
Merge pull request #491 from JayVora-SerpentCS/10-web-notify
Migrated web notify
This commit is contained in:
1
setup/web_notify/odoo/__init__.py
Normal file
1
setup/web_notify/odoo/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
1
setup/web_notify/odoo/addons/__init__.py
Normal file
1
setup/web_notify/odoo/addons/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
1
setup/web_notify/odoo/addons/web_notify
Symbolic link
1
setup/web_notify/odoo/addons/web_notify
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../web_notify
|
||||
6
setup/web_notify/setup.py
Normal file
6
setup/web_notify/setup.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
||||
@@ -63,6 +63,7 @@ Contributors
|
||||
------------
|
||||
|
||||
* Laurent Mignon <laurent.mignon@acsone.eu>
|
||||
* Serpent Consulting Services Pvt. Ltd.<jay.vora@serpentcs.com>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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({
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user