diff --git a/support_branding_adhoc/__openerp__.py b/support_branding_adhoc/__openerp__.py index 5aafdaf..888828a 100644 --- a/support_branding_adhoc/__openerp__.py +++ b/support_branding_adhoc/__openerp__.py @@ -39,6 +39,7 @@ ], 'data': [ 'ir_config_parameter.xml', + 'support.xml', ], 'demo': [ ], diff --git a/support_branding_adhoc/static/src/js/chat_widgets.js b/support_branding_adhoc/static/src/js/chat_widgets.js new file mode 100644 index 0000000..4750302 --- /dev/null +++ b/support_branding_adhoc/static/src/js/chat_widgets.js @@ -0,0 +1,30 @@ + (function(t,a,l,k,u,s,_){if(!t[u]){t[u]=function(){(t[u].q=t[u].q||[]).push(arguments)},t[u].l=1*new Date();s=a.createElement(l),_=a.getElementsByTagName(l)[0];s.async=1;s.src=k;_.parentNode.insertBefore(s,_)}})(window,document,'script','//www.talkus.io/plugin.js','talkus'); + talkus('loadingImage', 'https://www.adhoc.com.ar/website/image?field=datas&model=ir.attachment&id=1116'); + talkus('create', 'AKoBPjeu9YRvYHKQu'); + +function get_open_user() { + + var instance = openerp; + + instance.web.Notification = instance.web.Widget.extend({ + + init: function() { + + var func = new instance.web.Model("res.users").get_func("read"); + + func(instance.session.uid, ["name", "id", "email"]).then(function(res) { + if (res){ + talkus('identify', { id: res.name + "-" + res.id, name: res.name, email: res.email}); + } + + }); + } + + }); + + var widget = new instance.web.Notification(); + + +} + +get_open_user(); \ No newline at end of file diff --git a/support_branding_adhoc/support.xml b/support_branding_adhoc/support.xml new file mode 100644 index 0000000..139f3b2 --- /dev/null +++ b/support_branding_adhoc/support.xml @@ -0,0 +1,33 @@ + + + + + +