diff --git a/addons/im_livechat/__openerp__.py b/addons/im_livechat/__openerp__.py index 128d80489d4..68852c27db4 100644 --- a/addons/im_livechat/__openerp__.py +++ b/addons/im_livechat/__openerp__.py @@ -21,7 +21,7 @@ Help your customers with this chat, and analyse their feedback. 'data': [ "security/im_livechat_channel_security.xml", "security/ir.model.access.csv", - "views/im_chat_session_views.xml", + "views/mail_channel_views.xml", "views/im_livechat_channel_views.xml", "views/im_livechat_channel_templates.xml", "report/im_livechat_report_views.xml", @@ -30,7 +30,7 @@ Help your customers with this chat, and analyse their feedback. 'demo': [ "data/im_livechat_channel_demo.xml", ], - 'depends' : ["mail", "rating"], + 'depends': ["mail", "rating"], 'installable': True, 'auto_install': False, 'application': True, diff --git a/addons/im_livechat/models/__init__.py b/addons/im_livechat/models/__init__.py index 4caf13411c9..687ed1047e5 100644 --- a/addons/im_livechat/models/__init__.py +++ b/addons/im_livechat/models/__init__.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -* import im_livechat_channel -import im_chat_session +import mail_channel import rating diff --git a/addons/im_livechat/models/im_livechat_channel.py b/addons/im_livechat/models/im_livechat_channel.py index 85b202e002f..969d67f0909 100644 --- a/addons/im_livechat/models/im_livechat_channel.py +++ b/addons/im_livechat/models/im_livechat_channel.py @@ -38,7 +38,6 @@ class ImLivechatChannel(models.Model): help="URL to a static page where you client can discuss with the operator of the channel.") are_you_inside = fields.Boolean(string='Are you inside the matrix?', compute='_are_you_inside', store=False, readonly=True) - script_internal = fields.Text('Script (internal)', compute='_compute_script_internal', store=False, readonly=True) script_external = fields.Text('Script (external)', compute='_compute_script_external', store=False, readonly=True) nbr_session = fields.Integer('Number of session', compute='_compute_nbr_session', store=False, readonly=True) rating_percentage_satisfaction = fields.Integer('% Happy', compute='_compute_percentage_satisfaction', store=False, default=-1) @@ -75,17 +74,6 @@ class ImLivechatChannel(models.Model): self.image_small = False self.image_medium = False - @api.multi - def _compute_script_internal(self): - view = self.env['ir.model.data'].get_object('im_livechat', 'internal_loader') - values = { - "url": self.env['ir.config_parameter'].sudo().get_param('web.base.url'), - "dbname": self._cr.dbname, - } - for record in self: - values["channel"] = record.id - record.script_internal = view.render(values) - @api.multi def _compute_script_external(self): view = self.env['ir.model.data'].get_object('im_livechat', 'external_loader') diff --git a/addons/im_livechat/models/im_chat_session.py b/addons/im_livechat/models/mail_channel.py similarity index 100% rename from addons/im_livechat/models/im_chat_session.py rename to addons/im_livechat/models/mail_channel.py diff --git a/addons/im_livechat/report/im_livechat_report.py b/addons/im_livechat/report/im_livechat_report_channel.py similarity index 100% rename from addons/im_livechat/report/im_livechat_report.py rename to addons/im_livechat/report/im_livechat_report_channel.py diff --git a/addons/im_livechat/report/im_livechat_report_views.xml b/addons/im_livechat/report/im_livechat_report_channel_views.xml similarity index 100% rename from addons/im_livechat/report/im_livechat_report_views.xml rename to addons/im_livechat/report/im_livechat_report_channel_views.xml diff --git a/addons/im_livechat/static/src/js/im_livechat.js b/addons/im_livechat/static/src/js/im_livechat.js index c0f3bde83e5..d59f7b4a5cf 100644 --- a/addons/im_livechat/static/src/js/im_livechat.js +++ b/addons/im_livechat/static/src/js/im_livechat.js @@ -7,7 +7,7 @@ var user_session = require('web.session'); var time = require('web.time'); var utils = require('web.utils'); var Widget = require('web.Widget'); -var im_chat_common = require('im_chat.im_chat_common'); +var im_chat_common = require('mail.chat_common'); var _t = core._t; var QWeb = core.qweb; diff --git a/addons/im_livechat/views/im_chat_session_views.xml b/addons/im_livechat/views/mail_channel_views.xml similarity index 100% rename from addons/im_livechat/views/im_chat_session_views.xml rename to addons/im_livechat/views/mail_channel_views.xml