[IMP] web_linkedin: Added server domain and corrected html display

bzr revid: nicolas.vanhoren@openerp.com-20120824104730-f7p8lqibovjzo3vz
This commit is contained in:
niv-openerp 2012-08-24 12:47:30 +02:00
parent e28ec55117
commit ee8b4c6c64
2 changed files with 5 additions and 3 deletions

View File

@ -43,11 +43,13 @@ class web_linkedin_settings(osv.osv_memory):
_inherit = 'res.config.settings'
_columns = {
'api_key': fields.char(string="API Key", size=50),
'server_domain': fields.char(size=100),
}
def get_default_linkedin(self, cr, uid, fields, context=None):
key = self.pool.get("ir.config_parameter").get_param(cr, uid, "web.linkedin.apikey") or ""
return {'api_key': key}
dom = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
return {'api_key': key, 'server_domain': dom,}
def set_linkedin(self, cr, uid, ids, context=None):
key = self.browse(cr, uid, ids[0], context)["api_key"] or ""

View File

@ -23,7 +23,7 @@
or
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
</header>
<div>
<div class="oe_semantic_html">
<p>
To use the LinkedIn module with this database, an API Key is required. Please follow this procedure:
</p>
@ -34,7 +34,7 @@
<li>Log into LinkedIn.</li>
<li>Add a new application and fill the form:
<ul>
<li>JavaScript API Domain: the domain of the url used to log into this database (example: http://localhost:8069)</li>
<li>JavaScript API Domain: <field name="server_domain" readonly="1" style="width:0"/></li>
<li>The programming tool is Javascript</li>
</ul>
</li>