diff --git a/addons/live_support/live_support.py b/addons/live_support/live_support.py index 8f3ab8e5b31..8f0643e2281 100644 --- a/addons/live_support/live_support.py +++ b/addons/live_support/live_support.py @@ -27,4 +27,11 @@ class live_support_channel(osv.osv): _name = 'live_support.channel' _columns = { 'name': fields.char(string="Name", size=200, required=True), + 'user_ids': fields.many2many('im.user', 'live_support_channel_im_user', 'channel_id', 'user_id', string="Users"), + } + +class im_user(osv.osv): + _inherit = 'im.user' + _columns = { + 'support_channel_ids': fields.many2many('live_support.channel', 'live_support_channel_im_user', 'user_id', 'channel_id', string="Support Channels"), } diff --git a/addons/live_support/live_support_view.xml b/addons/live_support/live_support_view.xml index e2660d0b51a..05637a40f8f 100644 --- a/addons/live_support/live_support_view.xml +++ b/addons/live_support/live_support_view.xml @@ -8,8 +8,25 @@ live_support.channel tree,form - + + + + + support_channel.form + live_support.channel + +
+ +

+ +

+
+
+
+
+ - \ No newline at end of file diff --git a/addons/live_support/security/ir.model.access.csv b/addons/live_support/security/ir.model.access.csv index b003ba8cd9d..926a3c62451 100644 --- a/addons/live_support/security/ir.model.access.csv +++ b/addons/live_support/security/ir.model.access.csv @@ -1,3 +1,5 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_im_message,live_support.channel,model_live_support_channel,,1,0,0,0 -access_im_message,live_support.channel,model_live_support_channel,group_live_support,1,1,1,1 +access_ls_chann1,live_support.channel,model_live_support_channel,,1,0,0,0 +access_ls_chann2,live_support.channel,model_live_support_channel,group_live_support,1,1,1,1 +access_ls_message,live_support.im.message,web_im.model_im_message,portal.group_anonymous,0,0,0,0 +access_im_user,live_support.im.user,web_im.model_im_user,portal.group_anonymous,1,0,0,0 \ No newline at end of file diff --git a/addons/live_support/security/live_support_security.xml b/addons/live_support/security/live_support_security.xml index 341749626a0..05f10a3fe80 100644 --- a/addons/live_support/security/live_support_security.xml +++ b/addons/live_support/security/live_support_security.xml @@ -12,5 +12,17 @@ The user will be able to join support channels. + + \ No newline at end of file diff --git a/addons/web_im/security/ir.model.access.csv b/addons/web_im/security/ir.model.access.csv index 7333373446a..ed639353e21 100644 --- a/addons/web_im/security/ir.model.access.csv +++ b/addons/web_im/security/ir.model.access.csv @@ -1,3 +1,3 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_im_message,im.message,model_im_message,,1,0,1,0 -access_im_user,im.user,model_im_user,,1,1,1,0 \ No newline at end of file +access_im_message,im.message,model_im_message,base.group_user,1,0,1,0 +access_im_user,im.user,model_im_user,base.group_user,1,1,1,0 \ No newline at end of file diff --git a/addons/web_im/security/web_im_security.xml b/addons/web_im/security/web_im_security.xml index 29983a855d0..a5f71eee58c 100644 --- a/addons/web_im/security/web_im_security.xml +++ b/addons/web_im/security/web_im_security.xml @@ -1,24 +1,26 @@ - - - Can only read messages that you sent or messages sent to you - - ["|", ('to.user', '=', user.id), ('from.user', '=', user.id)] - - - - - + + + Can only read messages that you sent or messages sent to you + + + ["|", ('to.user', '=', user.id), ('from.user', '=', user.id)] + + + + + - - Can only modify your user - - [('user', '=', user.id)] - - - - - - + + Can only modify your user + + + [('user', '=', user.id)] + + + + + +