'web': True,
'certificate' : '001183545978470526509',
'js': ['static/src/js/pad.js'],
+ 'qweb' : [
+ "static/src/xml/*.xml",
+ ],
'images': ['static/src/img/pad_link_companies.jpeg'],
}
openerp.pad = function(instance) {
-var QWeb = instance.web.qweb;
-QWeb.add_template('/pad/static/src/xml/pad.xml');
-
instance.web.form.SidebarAttachments = instance.web.form.SidebarAttachments.extend({
on_attachments_loaded: function(attachments) {
this._super(attachments);
'certificate' : '001301246528927038493',
'js': ['static/src/js/share.js'],
'css': ['static/src/css/share.css'],
+ 'qweb' : [
+ "static/src/xml/*.xml",
+ ],
'images': ['images/share_wizard.jpeg','images/sharing_wizard_step1.jpeg', 'images/sharing_wizard_step2.jpeg'],
}
openerp.share = function(instance) {
-var QWeb = instance.web.qweb;
-QWeb.add_template('/share/static/src/xml/share.xml');
function launch_wizard(self, view) {
var action = view.widget_parent.action;
if (!_has_share) {
_has_share = $.Deferred(function() {
var self = this;
- var session = instance.webclient.session;
- session.on_session_invalid.add_last(function() { _has_share = null; });
- var func = new instance.web.Model(session, "share.wizard").get_func("has_share");
- func(session.uid).pipe(function(res) {
+ instance.connection.on_session_invalid.add_last(function() { _has_share = null; });
+ var func = new instance.web.Model(null, "share.wizard").get_func("has_share");
+ func(instance.connection.uid).pipe(function(res) {
if(res) {
self.resolve();
} else {
'css' : [
'static/src/css/lc.css',
],
+ 'qweb' : [
+ "static/src/xml/*.xml",
+ ],
'installable': True,
'active': False,
'certificate': '0013762192410413',
openerp.web_livechat = function (openerp) {
-var QWeb = openerp.web.qweb;
-QWeb.add_template('/web_livechat/static/src/xml/web_livechat.xml');
-
-
-// tracking code from LiveChat
-var license = '1035052',
- params = '',
- lang = 'en',
- skill = '0';
-__lc_load = function (p) { if (typeof __lc_loaded != 'function')
- if (p) { var d = document, l = d.createElement('script'), s =
- d.getElementsByTagName('script')[0], a = unescape('%26'),
- h = ('https:' == d.location.protocol ? 'https://' : 'http://'); l.type = 'text/javascript'; l.async = true;
- l.src = h + 'gis' + p +'.livechatinc.com/gis.cgi?serverType=control'+a+'licenseID='+license+a+'jsonp=__lc_load';
- if (!(typeof p['server'] !== 'string' || typeof __lc_serv === 'string')) {
- l.src = h + (__lc_serv = p['server']) + '/licence/'+license+'/script.cgi?lang='+lang+a+'groups='+skill;
- l.src += (params == '') ? '' : a+'params='+encodeURIComponent(encodeURIComponent(params)); s.parentNode.insertBefore(l, s);
- } else setTimeout(__lc_load, 1000); if(typeof __lc_serv != 'string'){ s.parentNode.insertBefore(l, s);}
- } else __lc_load(Math.ceil(Math.random()*5)); }
-__lc_load();
-
-
-
openerp.web_livechat.Livechat = openerp.web.Widget.extend({
template: 'Header-LiveChat',
}
});
-openerp.webclient.livechat = new openerp.web_livechat.Livechat(openerp.webclient);
-openerp.webclient.livechat.prependTo('div.header_corner');
+if (openerp.webclient) {
+ // tracking code from LiveChat
+ var license = '1035052',
+ params = '',
+ lang = 'en',
+ skill = '0';
+ __lc_load = function (p) { if (typeof __lc_loaded != 'function')
+ if (p) { var d = document, l = d.createElement('script'), s =
+ d.getElementsByTagName('script')[0], a = unescape('%26'),
+ h = ('https:' == d.location.protocol ? 'https://' : 'http://'); l.type = 'text/javascript'; l.async = true;
+ l.src = h + 'gis' + p +'.livechatinc.com/gis.cgi?serverType=control'+a+'licenseID='+license+a+'jsonp=__lc_load';
+ if (!(typeof p['server'] !== 'string' || typeof __lc_serv === 'string')) {
+ l.src = h + (__lc_serv = p['server']) + '/licence/'+license+'/script.cgi?lang='+lang+a+'groups='+skill;
+ l.src += (params == '') ? '' : a+'params='+encodeURIComponent(encodeURIComponent(params)); s.parentNode.insertBefore(l, s);
+ } else setTimeout(__lc_load, 1000); if(typeof __lc_serv != 'string'){ s.parentNode.insertBefore(l, s);}
+ } else __lc_load(Math.ceil(Math.random()*5)); }
+ __lc_load();
+
+ // and add widget to webclient
+ openerp.webclient.livechat = new openerp.web_livechat.Livechat(openerp.webclient);
+ openerp.webclient.livechat.prependTo('div.header_corner');
+}
};
'js': ['static/src/js/web_uservoice.js'],
'css': ['static/src/css/uservoice.css'],
+ 'qweb' : [
+ "static/src/xml/*.xml",
+ ],
'images': ['static/src/img/submit_an_idea.jpeg', 'static/src/img/web_uservoice_feedback.jpeg'],
}
openerp.web_uservoice = function(instance) {
-var QWeb = instance.web.qweb;
-QWeb.add_template('/web_uservoice/static/src/xml/web_uservoice.xml');
-
-$(function() {
- var src = ("https:" == document.location.protocol ? "https://" : "http://") + "cdn.uservoice.com/javascripts/widgets/tab.js";
- $.getScript(src);
-});
-
-
instance.web_uservoice.UserVoice = instance.web.Widget.extend({
template: 'Header-UserVoice',
default_forum: '77459',
});
-instance.webclient.uservoice = new instance.web_uservoice.UserVoice(instance.webclient);
-instance.webclient.uservoice.prependTo('div.header_corner');
+if (instance.webclient) {
+ $(function() {
+ var src = ("https:" == document.location.protocol ? "https://" : "http://") + "cdn.uservoice.com/javascripts/widgets/tab.js";
+ $.getScript(src);
+ });
+
+ instance.webclient.uservoice = new instance.web_uservoice.UserVoice(instance.webclient);
+ instance.webclient.uservoice.prependTo('div.header_corner');
+}
};