summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérome Maes <jem@openerp.com>2015-08-10 09:57:17 +0200
committerAaron Bohy <aab@odoo.com>2015-09-01 20:16:09 +0200
commit1d54858cbdd10dd6fbfbb3edc1e032317e2ba3f6 (patch)
treebf034d4611b3049409f2859c2bbe223e4a970831
parentd3279983c8683036209cf51c83e97f1c4d25411f (diff)
[MOV] im_livechat : restructure the module according to the new mail module
-rw-r--r--addons/im_livechat/__openerp__.py4
-rw-r--r--addons/im_livechat/models/__init__.py2
-rw-r--r--addons/im_livechat/models/im_livechat_channel.py12
-rw-r--r--addons/im_livechat/models/mail_channel.py (renamed from addons/im_livechat/models/im_chat_session.py)0
-rw-r--r--addons/im_livechat/report/im_livechat_report_channel.py (renamed from addons/im_livechat/report/im_livechat_report.py)0
-rw-r--r--addons/im_livechat/report/im_livechat_report_channel_views.xml (renamed from addons/im_livechat/report/im_livechat_report_views.xml)0
-rw-r--r--addons/im_livechat/static/src/js/im_livechat.js2
-rw-r--r--addons/im_livechat/views/mail_channel_views.xml (renamed from addons/im_livechat/views/im_chat_session_views.xml)0
8 files changed, 4 insertions, 16 deletions
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)
@@ -76,17 +75,6 @@ class ImLivechatChannel(models.Model):
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')
values = {
diff --git a/addons/im_livechat/models/im_chat_session.py b/addons/im_livechat/models/mail_channel.py
index a5af87d5580..a5af87d5580 100644
--- a/addons/im_livechat/models/im_chat_session.py
+++ b/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
index 4fa0436b001..4fa0436b001 100644
--- a/addons/im_livechat/report/im_livechat_report.py
+++ b/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
index 65ad87120dd..65ad87120dd 100644
--- a/addons/im_livechat/report/im_livechat_report_views.xml
+++ b/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
index fc864ddf0e6..fc864ddf0e6 100644
--- a/addons/im_livechat/views/im_chat_session_views.xml
+++ b/addons/im_livechat/views/mail_channel_views.xml