[FIX] ir_qweb: contact field must add 'http://' if the website url value has not...
authorChristophe Matthieu <chm@odoo.com>
Tue, 27 May 2014 13:13:44 +0000 (15:13 +0200)
committerChristophe Matthieu <chm@odoo.com>
Tue, 27 May 2014 13:13:44 +0000 (15:13 +0200)
openerp/addons/base/ir/ir_qweb.xml

index d021d49..c69dc17 100644 (file)
@@ -20,7 +20,7 @@
             <div t-if="fax and 'fax' in fields" class='css_editable_mode_hidden'><i t-if="not options.get('no_marker')" class='fa fa-file-text-o'/> <span itemprop="faxNumber" t-esc="fax"/></div>
             <div t-if="website and 'website' in fields" class='css_editable_mode_hidden'>
                 <i t-if="not options.get('no_marker')" class='fa fa-globe'/>
-                <a t-att-href="website"><span itemprop="website" t-esc="website"/></a>
+                <a t-att-href="website and '%s%s' % ('http://' if '://' not in website else '',website)"><span itemprop="website" t-esc="website"/></a>
             </div>
             <div t-if="email and 'email' in fields" class='css_editable_mode_hidden'><i t-if="not options.get('no_marker')" class='fa fa-envelope'/> <span itemprop="email" t-esc="email"/></div>
         </div>