From 6a1ebe8e3d25bd46fa0d2e345e304044d74b0f3a Mon Sep 17 00:00:00 2001 From: "Jay Vora(SerpentCS)" Date: Fri, 18 Nov 2016 18:52:57 +0530 Subject: [PATCH] [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)