From c2ed48a942dba9510405372ae558bc832e08b0ac Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 8 Aug 2012 10:38:59 +0200 Subject: [PATCH] Added wizard to fill api key bzr revid: nicolas.vanhoren@openerp.com-20120808083859-p81dah14fy9r0rrx --- addons/web_linkedin/static/src/js/linkedin.js | 15 ++++++++---- .../web_linkedin/static/src/xml/linkedin.xml | 23 ++++++++++++++++++- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/addons/web_linkedin/static/src/js/linkedin.js b/addons/web_linkedin/static/src/js/linkedin.js index 8e196434992..e199ae90841 100644 --- a/addons/web_linkedin/static/src/js/linkedin.js +++ b/addons/web_linkedin/static/src/js/linkedin.js @@ -51,10 +51,6 @@ openerp.web_linkedin = function(instance) { }, }); - /*return new instance.web.Model("ir.config_parameter").call("set_param", ["web.linkedin.apikey", "cxnr0l53n73x"]).pipe(function() { - return self.test_linkedin(); - });*/ - instance.web_linkedin.tester = new instance.web_linkedin.LinkedinTester(); instance.web_linkedin.Linkedin = instance.web.form.FieldChar.extend({ @@ -275,6 +271,17 @@ openerp.web_linkedin = function(instance) { init: function(parent, text) { this._super(parent, {title:_t("LinkedIn API Key")}); }, + start: function() { + this._super(); + var self = this; + this.$("button").click(function() { + var value = self.$("input").val(); + debugger; + return new instance.web.Model("ir.config_parameter").call("set_param", ["web.linkedin.apikey", value]).pipe(function() { + self.destroy(); + }); + }); + }, }); }; // vim:et fdc=0 fdl=0: diff --git a/addons/web_linkedin/static/src/xml/linkedin.xml b/addons/web_linkedin/static/src/xml/linkedin.xml index 3fa5509adfe..fbd95cb1e08 100644 --- a/addons/web_linkedin/static/src/xml/linkedin.xml +++ b/addons/web_linkedin/static/src/xml/linkedin.xml @@ -31,7 +31,28 @@
- Yoh! +

+ Connect OpenERP with LinkedIn to synchronize partners and customers with LinkedIn contacts and + get their data automatically (photos, address, news). You just need to setup the API key once, and it will work + for all users of your system. +

+
    +
  • Go to this URL: + https://www.linkedin.com/secure/developer. +
  • +
  • Log into LinkedIn.
  • +
  • Add New Application and fill the form, +
      +
    • JavaScript API Domain is Your domain name (e.g. https://yourcompany.my.openerp.com)
    • +
    • You can give multiple domain (e.g. yourcompany.my.openerp.com)
    • +
    • programming tools is Javascript
    • +
    +
  • +
  • Copy the API key here: + + +
  • +
\ No newline at end of file