From b1560fb7882bbebaa0ec6a12fdc7685c5122161f Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 30 Jan 2013 18:43:34 +0100 Subject: [PATCH] [FIX] web_analytics: test mock does not have a proper wbeclient instance As a quick workaround: double-check for the presence of a client in the openerp instance. Should probably be replaced by a proper mock in the web tests bzr revid: odo@openerp.com-20130130174334-mysskhhmvurj64fg --- addons/web_analytics/static/src/js/web_analytics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_analytics/static/src/js/web_analytics.js b/addons/web_analytics/static/src/js/web_analytics.js index d7fa5195f3d..732853f9fd6 100644 --- a/addons/web_analytics/static/src/js/web_analytics.js +++ b/addons/web_analytics/static/src/js/web_analytics.js @@ -280,7 +280,7 @@ openerp.web_analytics = function(instance) { // the call to bind_events() may have been delayed in some embed // cases, and when that happens we can skip the push, as the // proper one will be done when bind_event is eventually called. - if (instance.client.tracker) { + if (instance.client && instance.client.tracker) { instance.client.tracker._push_customvars(); } });