summaryrefslogtreecommitdiff
path: root/addons/web_linkedin/static/src/js/linkedin.js
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2012-11-15 11:27:41 +0100
committerniv-openerp <nicolas.vanhoren@openerp.com>2012-11-15 11:27:41 +0100
commitd3cf004baeba4e1d0b26a6d4f0ce1cb0e2138575 (patch)
tree412ab6063adf86da85dcb45a3b8487857dd321ee /addons/web_linkedin/static/src/js/linkedin.js
parent8fe036423c78467c9edce38abbdd0acbf60d07d9 (diff)
[IMP] web_linkedin: adapted to new linkedin api
bzr revid: nicolas.vanhoren@openerp.com-20121115102741-9vzb8qprvrh1lsmz
Diffstat (limited to 'addons/web_linkedin/static/src/js/linkedin.js')
-rw-r--r--addons/web_linkedin/static/src/js/linkedin.js4
1 files 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();