[FIX] ir_qweb: contact field must add 'http://' if the website url value has not...
[odoo/odoo.git] / openerp / addons / base / ir / ir_qweb.xml
1 <openerp>
2 <data>
3 <template id="contact">
4     <address t-ignore="true" class="mb0" itemscope="itemscope" itemtype="http://schema.org/Organization">
5         <div t-att-class="'name' not in fields and 'css_non_editable_mode_hidden'">
6             <span itemprop="name" t-esc="name"/>
7             <t t-if="options.get('country_image') and 'country_id' in fields and object.country_id and object.country_id.image">
8                 <span t-field="object.country_id.image" t-field-options='{"widget": "image", "class": "country_flag"}'/>
9             </t>
10         </div>
11         <div itemprop="address" itemscope="itemscope" itemtype="http://schema.org/PostalAddress">
12             <div t-if="address and 'address' in fields" class='css_editable_mode_hidden'>
13                 <i t-if="not options.get('no_marker')" class='fa fa-map-marker'/> <span itemprop="streetAddress" t-raw="address.replace('\n', options.get('no_tag_br') and ', ' or ('&lt;br/&gt;%s' % ('' if options.get('no_marker') else '&amp;nbsp; &amp;nbsp; ')))"/>
14             </div>
15             <div t-if="city and 'city' in fields" class='css_editable_mode_hidden'>
16                 <i t-if="not options.get('no_marker')" class='fa fa-map-marker'/> <span itemprop="addressLocality" t-raw="city"/>, <span itemprop="addressCountry" t-raw="country_id"/>
17             </div>
18             <div t-if="phone and 'phone' in fields" class='css_editable_mode_hidden'><i t-if="not options.get('no_marker')" class='fa fa-phone'/> <span itemprop="telephone" t-esc="phone"/></div>
19             <div t-if="mobile and 'mobile' in fields" class='css_editable_mode_hidden'><i t-if="not options.get('no_marker')" class='fa fa-mobile-phone'/> <span itemprop="telephone" t-esc="mobile"/></div>
20             <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>
21             <div t-if="website and 'website' in fields" class='css_editable_mode_hidden'>
22                 <i t-if="not options.get('no_marker')" class='fa fa-globe'/>
23                 <a t-att-href="website and '%s%s' % ('http://' if '://' not in website else '',website)"><span itemprop="website" t-esc="website"/></a>
24             </div>
25             <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>
26         </div>
27     </address>
28 </template>
29  </data>
30 </openerp>