From d3cf004baeba4e1d0b26a6d4f0ce1cb0e2138575 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 15 Nov 2012 11:27:41 +0100 Subject: [PATCH] [IMP] web_linkedin: adapted to new linkedin api bzr revid: nicolas.vanhoren@openerp.com-20121115102741-9vzb8qprvrh1lsmz --- addons/web_linkedin/static/src/js/linkedin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web_linkedin/static/src/js/linkedin.js b/addons/web_linkedin/static/src/js/linkedin.js index ec58c3736f4..d6237e48d51 100644 --- a/addons/web_linkedin/static/src/js/linkedin.js +++ b/addons/web_linkedin/static/src/js/linkedin.js @@ -20,7 +20,7 @@ openerp.web_linkedin = function(instance) { var tag = document.createElement('script'); tag.type = 'text/javascript'; tag.src = "http://platform.linkedin.com/in.js"; - tag.innerHTML = 'api_key : ' + self.api_key + '\nauthorize : true'; + tag.innerHTML = 'api_key : ' + self.api_key + '\nauthorize : true\nscope: r_network r_contactinfo'; document.getElementsByTagName('head')[0].appendChild(tag); self.linkedin_added = true; $(tag).load(function() { @@ -107,7 +107,7 @@ openerp.web_linkedin = function(instance) { } to_change.website = entity.websiteUrl; to_change.phone = false; - _.each(entity.locations.values || [], function(el) { + _.each((entity.locations || {}).values || [], function(el) { to_change.phone = el.contactInfo.phone1; }); var children_def = $.Deferred();