[FIX] bus, im_chat, website_livechat :fix date in js, bus cr.commit and access rules for portal
This commit is contained in:
parent
c363451f95
commit
bff521b23f
|
@ -51,8 +51,8 @@ class ImBus(osv.Model):
|
|||
"channel" : json_dump(channel),
|
||||
"message" : json_dump(message)
|
||||
}
|
||||
cr.commit()
|
||||
self.pool['bus.bus'].create(cr, openerp.SUPERUSER_ID, values)
|
||||
cr.commit()
|
||||
if random.random() < 0.01:
|
||||
self.gc(cr, uid)
|
||||
if channels:
|
||||
|
|
|
@ -136,7 +136,8 @@ class im_chat_session(osv.Model):
|
|||
if session_id:
|
||||
# get the image of the user
|
||||
res = self.pool["res.users"].read(cr, uid, [user_id], ["image_small"])[0]
|
||||
image_b64 = res["image_small"]
|
||||
if res["image_small"]:
|
||||
image_b64 = res["image_small"]
|
||||
return image_b64
|
||||
|
||||
class im_chat_message(osv.Model):
|
||||
|
|
|
@ -3,3 +3,7 @@ access_im_chat_message,im_chat.message,model_im_chat_message,base.group_user,1,0
|
|||
access_im_chat_session,im_chat.session,model_im_chat_session,base.group_user,1,1,1,0
|
||||
access_im_chat_conversation_state,im_chat.conversation_state,model_im_chat_conversation_state,base.group_user,1,1,1,0
|
||||
access_im_chat_presence,im_chat.presence,model_im_chat_presence,base.group_user,1,1,1,1
|
||||
access_im_chat_message_portal,im_chat.message,model_im_chat_message,base.group_portal,1,0,1,0
|
||||
access_im_chat_session_portal,im_chat.session,model_im_chat_session,base.group_portal,1,1,1,0
|
||||
access_im_chat_conversation_state_portal,im_chat.conversation_state,model_im_chat_conversation_state,base.group_portal,1,1,1,0
|
||||
access_im_chat_presence_portal,im_chat.presence,model_im_chat_presence,base.group_portal,1,1,1,1
|
|
|
@ -293,7 +293,7 @@
|
|||
}
|
||||
m.message = self.escape_keep_url(m.message);
|
||||
m.message = self.smiley(m.message);
|
||||
m.create_date = Date.parse(m.create_date).setTimezone("UTC").toString("yyyy-dd-MM HH:mm:ss");
|
||||
m.create_date = Date.parse(m.create_date).setTimezone("UTC").toString("yyyy-MM-dd HH:mm:ss");
|
||||
return m;
|
||||
});
|
||||
this.set("messages", _.sortBy(this.get("messages").concat(messages), function(m){ return m.id; }));
|
||||
|
@ -528,6 +528,7 @@
|
|||
});
|
||||
},
|
||||
switch_display: function() {
|
||||
this.calc_box();
|
||||
var fct = _.bind(function(place) {
|
||||
this.set("right_offset", place + this.$el.outerWidth());
|
||||
}, this);
|
||||
|
|
|
@ -13,6 +13,7 @@ For website built with Odoo CMS, this module include a chat button on your Websi
|
|||
'installable': True,
|
||||
'data': [
|
||||
'views/website_livechat.xml',
|
||||
'views/res_config.xml'
|
||||
'views/res_config.xml',
|
||||
'website_livechat_data.xml'
|
||||
],
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="website.default_website" model="website">
|
||||
<field name="channel_id" ref="im_livechat.channel_website"></field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
Loading…
Reference in New Issue