summaryrefslogtreecommitdiff
path: root/odoo/addons/base/views/ir_qweb_widget_templates.xml
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2017-10-17 16:02:04 +0200
committerThibault Delavallée <tde@odoo.com>2017-11-27 11:14:55 +0100
commitb162eb2e1e716282a4fc26bce2e363e190bb9cfb (patch)
tree6039a0e8912b92bd270f842e57a7ed55e3cd7557 /odoo/addons/base/views/ir_qweb_widget_templates.xml
parent969a55576ebd2e044315644e493b7c3c330f9787 (diff)
[MOV] base: move ir_* views to views/
Diffstat (limited to 'odoo/addons/base/views/ir_qweb_widget_templates.xml')
-rw-r--r--odoo/addons/base/views/ir_qweb_widget_templates.xml46
1 files changed, 46 insertions, 0 deletions
diff --git a/odoo/addons/base/views/ir_qweb_widget_templates.xml b/odoo/addons/base/views/ir_qweb_widget_templates.xml
new file mode 100644
index 00000000000..63057f1a25a
--- /dev/null
+++ b/odoo/addons/base/views/ir_qweb_widget_templates.xml
@@ -0,0 +1,46 @@
+<odoo>
+<template id="contact_name">
+ <div t-if="'name' in fields">
+ <t t-if="object.name">
+ <span itemprop="name" t-esc="name"/>
+ </t>
+ <t t-if="not object.name and object.parent_name">
+ <span itemprop="name" t-esc="object.parent_name"/>
+ </t>
+ <div t-if="options.get('country_image') and 'country_id' in fields and object.country_id and object.country_id.image">
+ <span t-field="object.country_id.image" t-options='{"widget": "image", "class": "country_flag"}'/>
+ </div>
+ </div>
+</template>
+<template id="contact">
+ <address t-ignore="true" class="mb0" itemscope="itemscope" itemtype="http://schema.org/Organization">
+ <div t-if="not (('name' in fields) or (address and 'address' in fields) or (city and 'city' in fields) or (mobile and 'mobile' in fields) or (website and 'website' in fields) or (email and 'email' in fields))" class="css_non_editable_mode_hidden">
+ --<span class="text-muted" t-esc="name"/>--
+ </div>
+ <t t-if="object.country_id.name_position != 'after'">
+ <t t-call="base.contact_name"/>
+ </t>
+ <div itemprop="address" itemscope="itemscope" itemtype="http://schema.org/PostalAddress">
+ <div t-if="address and 'address' in fields">
+ <i t-if="not options.get('no_marker')" class='fa fa-map-marker fa-fw'/> <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; ')))"/>
+ </div>
+ <div t-if="city and 'city' in fields">
+ <i t-if="not options.get('no_marker')" class='fa fa-map-marker fa-fw'/>
+ <span itemprop="addressLocality" t-raw="city"/>,
+ <span itemprop="addressCountry" t-raw="country_id"/>
+ </div>
+ <div t-if="phone and 'phone' in fields"><i t-if="not options.get('no_marker') or options.get('phone_icons')" class='fa fa-phone fa-fw'/> <span itemprop="telephone" t-esc="phone"/></div>
+ <div t-if="mobile and 'mobile' in fields"><i t-if="not options.get('no_marker') or options.get('phone_icons')" class='fa fa-mobile fa-fw'/> <span itemprop="telephone" t-esc="mobile"/></div>
+ <div t-if="fax and 'fax' in fields"><i t-if="not options.get('no_marker') or options.get('phone_icons')" class='fa fa-fax fa-fw'/> <span itemprop="faxNumber" t-esc="fax"/></div>
+ <div t-if="website and 'website' in fields">
+ <i t-if="not options.get('no_marker')" class='fa fa-globe'/>
+ <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"><i t-if="not options.get('no_marker')" class='fa fa-envelope fa-fw'/> <span itemprop="email" t-esc="email"/></div>
+ </div>
+ <t t-if="object.country_id and object.country_id.name_position == 'after'">
+ <t t-call="base.contact_name"/>
+ </t>
+ </address>
+</template>
+</odoo>