summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2016-05-03 14:05:47 +0200
committerChristophe Matthieu <chm@odoo.com>2016-06-14 09:46:26 +0200
commit710a7cee14dcacdc54e783678b647a2730be3462 (patch)
tree506e83bd3a662a0b0ec2f54a6ee5958de6e41f74
parentd159aec83d3c0ae07699db808451771231abe989 (diff)
[FIX] website: t-att-*** display empty string attribute
Remove attribute only if the result is False or None
-rw-r--r--addons/payment_ogone/views/ogone.xml2
-rw-r--r--addons/payment_stripe/views/stripe.xml2
-rw-r--r--addons/survey/views/survey_templates.xml4
-rw-r--r--addons/web/static/src/xml/base.xml4
-rw-r--r--addons/web/views/webclient_templates.xml4
-rw-r--r--addons/web_planner/views/web_planner_templates.xml2
-rw-r--r--addons/website/views/website_backend_navbar.xml4
-rw-r--r--addons/website/views/website_templates.xml16
-rw-r--r--addons/website_blog/views/website_blog_templates.xml2
-rw-r--r--addons/website_crm_partner_assign/views/website_crm_partner_assign.xml4
-rw-r--r--addons/website_customer/views/website_customer.xml2
-rw-r--r--addons/website_event/views/website_event_templates.xml8
-rw-r--r--addons/website_event_track/views/website_event_track_templates.xml2
-rw-r--r--addons/website_forum/views/website_forum.xml40
-rw-r--r--addons/website_forum_doc/views/website_doc.xml4
-rw-r--r--addons/website_google_map/views/google_map_templates.xml2
-rw-r--r--addons/website_hr_recruitment/views/templates.xml6
-rw-r--r--addons/website_mass_mailing/views/unsubscribe.xml2
-rw-r--r--addons/website_membership/views/website_membership.xml4
-rw-r--r--addons/website_project_issue/views/project_issue_templates.xml1
-rw-r--r--addons/website_quote/views/report_saleorder.xml4
-rw-r--r--addons/website_quote/views/website_quotation.xml8
-rw-r--r--addons/website_sale/views/templates.xml38
-rw-r--r--addons/website_sale_delivery/views/website_sale_delivery.xml12
-rw-r--r--addons/website_sale_options/views/templates.xml2
-rw-r--r--addons/website_slides/view/website_slides.xml4
26 files changed, 91 insertions, 92 deletions
diff --git a/addons/payment_ogone/views/ogone.xml b/addons/payment_ogone/views/ogone.xml
index c36574438ed..69ebe0d7e5f 100644
--- a/addons/payment_ogone/views/ogone.xml
+++ b/addons/payment_ogone/views/ogone.xml
@@ -56,7 +56,7 @@
<template id="ogone_s2s_form">
<form method="post" t-att-action="'/payment/ogone/s2s/create' if not json else '/payment/ogone/s2s/create_json'">
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
- <div t-att-class="'row' if bootstrap_formatting else ''">
+ <div t-att-class="'row' if bootstrap_formatting else None">
<div t-att-class="'form-group col-md-8' if bootstrap_formatting else 'form-group'">
<label class="control-label" for="cc_number">Card number</label>
<input type="tel" name="cc_number" id="cc_number" class="form-control" placeholder="&#8226;&#8226;&#8226;&#8226;&#32;&#8226;&#8226;&#8226;&#8226;&#32;&#8226;&#8226;&#8226;&#8226;&#32;&#8226;&#8226;&#8226;&#8226;&#32;"/>
diff --git a/addons/payment_stripe/views/stripe.xml b/addons/payment_stripe/views/stripe.xml
index ea089287b22..a7f512b5330 100644
--- a/addons/payment_stripe/views/stripe.xml
+++ b/addons/payment_stripe/views/stripe.xml
@@ -30,7 +30,7 @@
<template id="stripe_s2s_form">
<form method="post" t-att-action="'/payment/stripe/s2s/create' if not json else '/payment/stripe/s2s/create_json'">
- <div t-att-class="'row' if bootstrap_formatting else ''">
+ <div t-att-class="'row' if bootstrap_formatting else None">
<div t-att-class="'form-group col-md-8' if bootstrap_formatting else 'form-group'">
<label class="control-label" for="cc_number">Card Number</label>
<input type="tel" name="cc_number" id="cc_number" class="form-control" placeholder="&#8226;&#8226;&#8226;&#8226;&#32;&#8226;&#8226;&#8226;&#8226;&#32;&#8226;&#8226;&#8226;&#8226;&#32;&#8226;&#8226;&#8226;&#8226;&#32;"/>
diff --git a/addons/survey/views/survey_templates.xml b/addons/survey/views/survey_templates.xml
index 86dbe11aad3..d984c47fa99 100644
--- a/addons/survey/views/survey_templates.xml
+++ b/addons/survey/views/survey_templates.xml
@@ -204,7 +204,7 @@
</div>
<div t-if="question.display_mode == 'columns' or not token" class="row js_radio">
<div t-foreach='question.labels_ids' t-as='label' t-attf-class="col-md-#{question.column_nb}">
- <label t-att-class="' bg-success ' if quizz_correction and label.quizz_mark > 0.0 else ''">
+ <label t-att-class="' bg-success ' if quizz_correction and label.quizz_mark > 0.0 else None">
<input type="radio" t-att-name="prefix" t-att-value='label.id' />
<span t-field='label.value'/>
</label>
@@ -226,7 +226,7 @@
<template id="multiple_choice" name="Multiple choice">
<div class="row">
<div t-foreach='question.labels_ids' t-as='label' t-attf-class="col-md-#{question.column_nb}">
- <label t-att-class="' bg-success ' if quizz_correction and label.quizz_mark > 0.0 else ''">
+ <label t-att-class="' bg-success ' if quizz_correction and label.quizz_mark > 0.0 else None">
<input type="checkbox" t-att-name="'%s_%s' % (prefix, label.id)" t-att-value='label.id' />
<span t-field='label.value'/>
</label>
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 9be26781e99..1b373d5fd50 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -234,7 +234,7 @@
<t t-esc="section.label"/> <span class="caret"/>
</button>
<t t-if="section.name == 'buttons'" t-foreach="widget.items[section.name]" t-as="item" t-att-class="item.classname">
- <a t-att-title="item.title or ''" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url" target="_blank">
+ <a t-att-title="item.title or None" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url" target="_blank">
<t t-raw="item.label"/>
</a>
</t>
@@ -256,7 +256,7 @@
<t t-raw="item.write_uid[1] + ' ' + item.write_date"/>
</t>
</t>
- <a t-att-title="item.title or ''" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url">
+ <a t-att-title="item.title or None" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url">
<t t-raw="item.label"/>
<span t-if="section.name == 'files' and widget.options.editable and !item.callback" class="fa fa-trash-o o_sidebar_delete_attachment" t-att-data-id="item.id" title="Delete this attachment"/>
</a>
diff --git a/addons/web/views/webclient_templates.xml b/addons/web/views/webclient_templates.xml
index cf622429868..b8bf3a89274 100644
--- a/addons/web/views/webclient_templates.xml
+++ b/addons/web/views/webclient_templates.xml
@@ -316,8 +316,8 @@
<a t-att-href="'/web%s#menu_id=%s&amp;action=%s' % (debug_param, menu['id'], menu['action'] and menu['action'].split(',')[1] or '')"
t-att-class="'oe_menu_toggler' if menu.get('children') else 'oe_menu_leaf'"
t-att-data-menu="menu['id']"
- t-att-data-action-model="menu['action'] and menu['action'].split(',')[0] or ''"
- t-att-data-action-id="menu['action'] and menu['action'].split(',')[1] or ''">
+ t-att-data-action-model="menu['action'] and menu['action'].split(',')[0] or None"
+ t-att-data-action-id="menu['action'] and menu['action'].split(',')[1] or None">
<span class="oe_menu_text">
<t t-esc="menu['name']"/>
</span>
diff --git a/addons/web_planner/views/web_planner_templates.xml b/addons/web_planner/views/web_planner_templates.xml
index 4fe3113a2df..b17fc6ce4bc 100644
--- a/addons/web_planner/views/web_planner_templates.xml
+++ b/addons/web_planner/views/web_planner_templates.xml
@@ -25,7 +25,7 @@
<template id="page">
<div t-att-id="page_id" t-att-title="page_title" t-att-hide-from-menu="hide_from_menu" t-att-hide-mark-as-done="hide_mark_as_done" class="o_planner_page container-fluid">
- <h1 t-esc="page_title" t-att-data-menutitle="page_menutitle or page_title" t-att-class="'hidden' if hide_title else ''"/>
+ <h1 t-esc="page_title" t-att-data-menutitle="page_menutitle or page_title" t-att-class="'hidden' if hide_title else None"/>
<t t-raw="0"/>
</div>
</template>
diff --git a/addons/website/views/website_backend_navbar.xml b/addons/website/views/website_backend_navbar.xml
index 44583e81b61..7c238e8f3bb 100644
--- a/addons/website/views/website_backend_navbar.xml
+++ b/addons/website/views/website_backend_navbar.xml
@@ -3,7 +3,7 @@
<!-- Front-end/Back-end integration -->
<template id="user_navbar" inherit_id="website.layout">
<xpath expr="//body" position="attributes">
- <attribute name="t-att-class">'o_connected_user' if env['ir.ui.view'].user_has_groups('base.group_user') else ''</attribute>
+ <attribute name="t-att-class">'o_connected_user' if env['ir.ui.view'].user_has_groups('base.group_user') else None</attribute>
</xpath>
<xpath expr="//body/div['id=wrawrap']" position="before">
<nav groups="base.group_user" t-if="website and menu_data" id="oe_main_menu_navbar" class="o_main_navbar">
@@ -15,7 +15,7 @@
<ul class="dropdown-menu">
<li t-as="menu" t-foreach="menu_data['children']">
<t t-set="debug_param" t-value="'?&amp;debug=' if debug else ''"/>
- <a t-att-class="'oe_menu_toggler' if menu.get('children') else 'oe_menu_leaf'" t-att-data-action-id="menu['action'] and menu['action'].split(',')[1] or ''" t-att-data-action-model="menu['action'] and menu['action'].split(',')[0] or ''" t-att-data-menu="menu['id']" t-att-href="'/web%s#menu_id=%s&amp;action=%s' % (debug_param, menu['id'], menu['action'] and menu['action'].split(',')[1] or '')">
+ <a t-att-class="'oe_menu_toggler' if menu.get('children') else 'oe_menu_leaf'" t-att-data-action-id="menu['action'] and menu['action'].split(',')[1] or None" t-att-data-action-model="menu['action'] and menu['action'].split(',')[0] or None" t-att-data-menu="menu['id']" t-att-href="'/web%s#menu_id=%s&amp;action=%s' % (debug_param, menu['id'], menu['action'] and menu['action'].split(',')[1] or '')">
<i t-attf-class="fa #{menu.get('icon')} fa-lg fa-fw" t-if="menu.get('icon')"/>
<span class="oe_menu_text">
<t t-esc="menu['name']"/>
diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml
index 0bb4b7a94e2..1a1f72da751 100644
--- a/addons/website/views/website_templates.xml
+++ b/addons/website/views/website_templates.xml
@@ -421,7 +421,7 @@
<!-- Util template -->
<template id="publish_management">
- <div groups="base.group_website_publisher" t-ignore="true" class="pull-right css_editable_mode_hidden" t-att-style="style or ''">
+ <div groups="base.group_website_publisher" t-ignore="true" class="pull-right css_editable_mode_hidden" t-att-style="style or None">
<div t-attf-class="btn-group js_publish_management #{object.website_published and 'css_published' or 'css_unpublished'}" t-att-data-id="object.id" t-att-data-object="object._name" t-att-data-controller="publish_controller">
<button class="btn btn-danger js_publish_btn">Not Published</button>
<button class="btn btn-success js_publish_btn">Published</button>
@@ -449,15 +449,15 @@
</template>
<template id="pager" name="Pager">
- <ul t-if="pager['page_count'] > 1" t-attf-class="#{ classname or '' } pagination" t-att-style="style or ''">
- <li t-att-class=" 'disabled' if pager['page']['num'] == 1 else '' ">
- <a t-att-href=" pager['page_previous']['url'] if pager['page']['num'] != 1 else ''">Prev</a>
+ <ul t-if="pager['page_count'] > 1" t-attf-class="#{ classname or '' } pagination" t-att-style="style or None">
+ <li t-att-class=" 'disabled' if pager['page']['num'] == 1 else None ">
+ <a t-att-href=" pager['page_previous']['url'] if pager['page']['num'] != 1 else None">Prev</a>
</li>
<t t-foreach="pager['pages']" t-as="page">
- <li t-att-class=" 'active' if page['num'] == pager['page']['num'] else '' "> <a t-att-href="page['url']" t-raw="page['num']"></a></li>
+ <li t-att-class=" 'active' if page['num'] == pager['page']['num'] else None "> <a t-att-href="page['url']" t-raw="page['num']"></a></li>
</t>
- <li t-att-class=" 'disabled' if pager['page']['num'] == pager['page_count'] else '' ">
- <a t-att-href="pager['page_next']['url'] if pager['page']['num'] != pager['page_count'] else ''">Next</a>
+ <li t-att-class=" 'disabled' if pager['page']['num'] == pager['page_count'] else None ">
+ <a t-att-href="pager['page_next']['url'] if pager['page']['num'] != pager['page_count'] else None">Next</a>
</li>
</ul>
</template>
@@ -537,7 +537,7 @@
<li t-attf-class="prev #{'active' if obj['page'] == 1 else '' }">
<a t-att-href=" '%s,%s-%s' % (obj['kanban_url'], obj['column_id'].id, (obj['page'] &gt; 1 and obj['page']-1 or 1)) ">Prev</a></li>
<t t-foreach="range(obj['page_start'], obj['page_end']+1)" t-as="p">
- <li t-att-class=" 'active' if obj['page'] == p else '' ">
+ <li t-att-class=" 'active' if obj['page'] == p else None ">
<a t-att-href=" '%s,%s-%s' % (obj['kanban_url'], obj['column_id'].id, p)" t-esc="p"></a></li>
</t>
<li t-attf-class="next #{'active' if obj['page'] == obj['page_end'] else '' }">
diff --git a/addons/website_blog/views/website_blog_templates.xml b/addons/website_blog/views/website_blog_templates.xml
index ae4cea4fcff..5360f64fbf9 100644
--- a/addons/website_blog/views/website_blog_templates.xml
+++ b/addons/website_blog/views/website_blog_templates.xml
@@ -468,7 +468,7 @@
<h4>Our Blogs</h4>
<ul class="nav nav-pills nav-stacked">
<t t-foreach="blogs" t-as="nav_blog">
- <li t-att-class="nav_blog.id == blog.id and 'active' or ''">
+ <li t-att-class="nav_blog.id == blog.id and 'active' or None">
<a t-attf-href="#{blog_url(blog=nav_blog, tag=False, date_begin=False, date_end=False)}">
<span t-field="nav_blog.name"/>
</a>
diff --git a/addons/website_crm_partner_assign/views/website_crm_partner_assign.xml b/addons/website_crm_partner_assign/views/website_crm_partner_assign.xml
index 8263a788eb2..ea7db7cd8ac 100644
--- a/addons/website_crm_partner_assign/views/website_crm_partner_assign.xml
+++ b/addons/website_crm_partner_assign/views/website_crm_partner_assign.xml
@@ -41,7 +41,7 @@
<ul id="reseller_grades" class="nav nav-pills nav-stacked mt16">
<li class="nav-header"><h3>Filter by Level</h3></li>
<t t-foreach="grades" t-as="grade">
- <li t-att-class="grade['active'] and 'active' or ''">
+ <li t-att-class="grade['active'] and 'active' or None">
<a t-attf-href="/partners#{ grade['grade_id'][0] and '/grade/%s' % grade['grade_id'][0] or '' }#{ current_country and '/country/%s' % slug(current_country) or '' }#{ '?' + (search_path or '') }">
<span class="badge pull-right" t-esc="grade['grade_id_count'] or ''"/>
<t t-esc="grade['grade_id'][1]"/>
@@ -53,7 +53,7 @@
<ul id="reseller_countries" class="nav nav-pills nav-stacked mt16">
<li class="nav-header"><h3>Filter by Country</h3></li>
<t t-foreach="countries" t-as="country">
- <li t-if="country['country_id']" t-att-class="country['active'] and 'active' or ''">
+ <li t-if="country['country_id']" t-att-class="country['active'] and 'active' or None">
<a t-attf-href="/partners#{ current_grade and '/grade/%s' % slug(current_grade) or ''}#{country['country_id'][0] and '/country/%s' % country['country_id'][0] or '' }#{ '?' + (search_path or '') + (country['country_id'][0] == 0 and '&amp;country_all=True' or '')}">
<span class="badge pull-right" t-esc="country['country_id_count'] or ''"/>
<t t-esc="country['country_id'][1]"/>
diff --git a/addons/website_customer/views/website_customer.xml b/addons/website_customer/views/website_customer.xml
index 680b82c4a18..9feaaa515a7 100644
--- a/addons/website_customer/views/website_customer.xml
+++ b/addons/website_customer/views/website_customer.xml
@@ -97,7 +97,7 @@
<ul class="nav nav-pills nav-stacked mt16 mb32">
<t t-foreach="countries" t-as="country_dict">
<t t-if="country_dict['country_id']">
- <li t-att-class="country_dict['country_id'][0] == current_country_id and 'active' or ''">
+ <li t-att-class="country_dict['country_id'][0] == current_country_id and 'active' or None">
<a t-attf-href="/customers/#{ tag and 'tag/%s/' % slug(tag) or '' }#{ country_dict['country_id'][0] and 'country/%s' % slug(country_dict['country_id']) or '' }#{ search_path }">
<span class="badge pull-right" t-esc="country_dict['country_id_count'] or '0'"/>
<t t-esc="country_dict['country_id'][1]"/>
diff --git a/addons/website_event/views/website_event_templates.xml b/addons/website_event/views/website_event_templates.xml
index fe1f57783c0..f94d6f2d282 100644
--- a/addons/website_event/views/website_event_templates.xml
+++ b/addons/website_event/views/website_event_templates.xml
@@ -150,7 +150,7 @@
<div class="col-md-3 css_noprint" id="left_column">
<ul class="nav nav-pills nav-stacked">
<t t-foreach="dates" t-as="date">
- <li t-att-class="searches.get('date') == date[0] and 'active' or ''" t-if="date[3] or (date[0] in ('old','all'))">
+ <li t-att-class="searches.get('date') == date[0] and 'active' or None" t-if="date[3] or (date[0] in ('old','all'))">
<a t-attf-href="/event?{{ keep_query('country', 'type', date=date[0]) }}"><t t-esc="date[1]"/>
<span t-if="date[3]" class="badge pull-right"><t t-esc="date[3]"/></span>
</a>
@@ -166,7 +166,7 @@
<ul class="nav nav-pills nav-stacked mt32">
<t t-foreach="types" t-as="type">
<li t-if="type['event_type_id']"
- t-att-class="searches.get('type') == str(type['event_type_id'] and type['event_type_id'][0]) and 'active' or ''">
+ t-att-class="searches.get('type') == str(type['event_type_id'] and type['event_type_id'][0]) and 'active' or None">
<a t-attf-href="/event?{{ keep_query('country', 'date', type=type['event_type_id'][0]) }}"><t t-esc="type['event_type_id'][1]"/>
<span class="badge pull-right"><t t-esc="type['event_type_id_count']"/></span>
</a>
@@ -180,12 +180,12 @@
<xpath expr="//div[@id='left_column']" position="inside">
<ul class="nav nav-pills nav-stacked mt32">
<t t-foreach="countries" t-as="country">
- <li t-if="country['country_id']" t-att-class="searches.get('country') == str(country['country_id'] and country['country_id'][0]) and 'active' or ''">
+ <li t-if="country['country_id']" t-att-class="searches.get('country') == str(country['country_id'] and country['country_id'][0]) and 'active' or None">
<a t-attf-href="/event?{{ keep_query('type', 'date', country=country['country_id'][0]) }}"><t t-esc="country['country_id'][1]"/>
<span class="badge pull-right"><t t-esc="country['country_id_count']"/></span>
</a>
</li>
- <li t-if="not country['country_id']" t-att-class="searches.get('country') == 'online' and 'active' or ''">
+ <li t-if="not country['country_id']" t-att-class="searches.get('country') == 'online' and 'active' or None">
<a t-attf-href="/event?{{ keep_query('type', 'date', country='online') }}">
<span>Online Events</span>
<span class="badge pull-right"><t t-esc="country['country_id_count']"/></span>
diff --git a/addons/website_event_track/views/website_event_track_templates.xml b/addons/website_event_track/views/website_event_track_templates.xml
index 8e10ebaec2f..860ea6e1bd1 100644
--- a/addons/website_event_track/views/website_event_track_templates.xml
+++ b/addons/website_event_track/views/website_event_track_templates.xml
@@ -156,7 +156,7 @@
<ul class="nav nav-pills nav-stacked">
<li t-att-class="'' if searches.get('tag') else 'active'"><a t-attf-href="/event/#{ slug(event) }/track">All Tags</a></li>
<t t-foreach="tags" t-as="tag">
- <li t-att-class="searches.get('tag') == tag.id and 'active' or ''">
+ <li t-att-class="searches.get('tag') == tag.id and 'active' or None">
<a t-attf-href="/event/#{ slug(event) }/track/tag/#{ slug(tag) }">
<t t-esc="tag.name"/>
</a>
diff --git a/addons/website_forum/views/website_forum.xml b/addons/website_forum/views/website_forum.xml
index 8669261b1a3..a5dcb5348f5 100644
--- a/addons/website_forum/views/website_forum.xml
+++ b/addons/website_forum/views/website_forum.xml
@@ -68,24 +68,24 @@
</div>
<div class="collapse navbar-collapse" id="oe-help-navbar-collapse">
<ul class="nav navbar-nav">
- <li t-att-class="sorting == 'relevancy desc' and 'active' or '' ">
+ <li t-att-class="sorting == 'relevancy desc' and 'active' or None ">
<a t-attf-href="/forum/#{ slug(forum) }?{{ keep_query( 'search', 'post_type', 'filters', sorting='relevancy desc') }}">Trending</a>
</li>
- <li t-att-class="sorting == 'create_date desc' and 'active' or '' ">
+ <li t-att-class="sorting == 'create_date desc' and 'active' or None ">
<a t-attf-href="/forum/#{ slug(forum) }?{{ keep_query( 'search', 'post_type', 'filters', sorting='create_date desc') }}">Newest</a>
</li>
- <li t-att-class="searches.get('users') and 'active' or '' ">
+ <li t-att-class="searches.get('users') and 'active' or None ">
<a t-attf-href="/forum/#{ slug(forum) }/users">People</a>
</li>
- <li t-att-class="searches.get('tags') and 'active' or '' ">
+ <li t-att-class="searches.get('tags') and 'active' or None ">
<a t-attf-href="/forum/#{ slug(forum) }/tag">Tags</a>
</li>
- <li t-att-class="searches.get('badges') and 'active' or '' ">
+ <li t-att-class="searches.get('badges') and 'active' or None ">
<a t-attf-href="/forum/#{ slug(forum) }/badge">Badges</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
- <li t-if="not is_public_user" t-att-class="searches.get('my_profile') and 'active' or '' ">
+ <li t-if="not is_public_user" t-att-class="searches.get('my_profile') and 'active' or None ">
<a t-attf-href="/forum/#{ slug(forum) }/user/#{uid}">
<span t-field="user_id.name"/> (k: <t t-esc="user_id.karma"/>)
</a>
@@ -418,33 +418,33 @@
</a>
<ul class="dropdown-menu">
<li class="dropdown-header">Filter on</li>
- <li t-att-class="filters == 'all' and 'active' or '' ">
+ <li t-att-class="filters == 'all' and 'active' or None ">
<a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='all')">All</a>
</li>
- <li t-att-class="filters == 'unanswered' and 'active' or '' ">
+ <li t-att-class="filters == 'unanswered' and 'active' or None ">
<a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='unanswered')">Unanswered</a>
</li>
- <li t-if="uid" t-att-class="filters == 'followed' and 'active' or '' ">
+ <li t-if="uid" t-att-class="filters == 'followed' and 'active' or None ">
<a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='followed')">Followed</a>
</li>
<li t-if="tag" class="dropdown-header">Tags</li>
- <li t-if="tag" t-att-class="tag and 'active' or '' ">
+ <li t-if="tag" t-att-class="tag and 'active' or None ">
<a href=""><t t-esc="tag.name"/></a>
</li>
<li class="dropdown-header">Sort by</li>
- <li t-att-class="sorting == 'relevancy desc' and 'active' or '' ">
+ <li t-att-class="sorting == 'relevancy desc' and 'active' or None ">
<a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='relevancy desc')">Relevance</a>
</li>
- <li t-att-class="sorting == 'write_date desc' and 'active' or '' ">
+ <li t-att-class="sorting == 'write_date desc' and 'active' or None ">
<a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='write_date desc')">Last activity date</a>
</li>
- <li t-att-class="sorting == 'create_date desc' and 'active' or '' ">
+ <li t-att-class="sorting == 'create_date desc' and 'active' or None ">
<a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='create_date desc')">Newest</a>
</li>
- <li t-att-class="sorting == 'child_count desc' and 'active' or '' ">
+ <li t-att-class="sorting == 'child_count desc' and 'active' or None ">
<a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='child_count desc')">Most answered</a>
</li>
- <li t-att-class="sorting == 'vote_count desc' and 'active' or '' ">
+ <li t-att-class="sorting == 'vote_count desc' and 'active' or None ">
<a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='vote_count desc')">Most voted</a>
</li>
</ul>
@@ -875,7 +875,7 @@
<a t-attf-class="fa fa-reply" href="#post_reply"> Reply</a>
</li>
<li t-if="question.post_type == 'question'">
- <a style="cursor: pointer" t-att-data-toggle="question.can_comment and 'collapse' or ''"
+ <a style="cursor: pointer" t-att-data-toggle="question.can_comment and 'collapse' or None"
t-attf-class="fa fa-comment-o #{not question.can_comment and 'karma_required text-muted' or ''}"
t-attf-data-karma="#{not question.can_comment and question.karma_comment or 0}"
t-attf-data-target="#comment#{ question._name.replace('.','') + '-' + str(question.id) }">
@@ -988,7 +988,7 @@
<li t-if="question.post_type == 'question'">
<a t-attf-class="fa fa-comment-o #{not answer.can_comment and 'karma_required text-muted' or ''}"
t-attf-data-karma="#{not answer.can_comment and answer.karma_comment or 0}"
- style="cursor: pointer" t-att-data-toggle="answer.can_comment and 'collapse' or ''"
+ style="cursor: pointer" t-att-data-toggle="answer.can_comment and 'collapse' or None"
t-attf-data-target="#comment#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Comment
</a>
</li>
@@ -1166,13 +1166,13 @@
<b class="caret"/>
</a>
<ul class="dropdown-menu">
- <li t-att-class="queue_type == 'validation' and 'active' or '' ">
+ <li t-att-class="queue_type == 'validation' and 'active' or None ">
<a t-attf-href="/forum/#{slug(forum)}/validation_queue">Pending</a>
</li>
- <li t-att-class="queue_type == 'flagged' and 'active' or '' ">
+ <li t-att-class="queue_type == 'flagged' and 'active' or None ">
<a t-attf-href="/forum/#{slug(forum)}/flagged_queue">Flagged</a>
</li>
- <li t-if="uid" t-att-class="queue_type == 'offensive' and 'active' or '' ">
+ <li t-if="uid" t-att-class="queue_type == 'offensive' and 'active' or None ">
<a t-attf-href="/forum/#{slug(forum)}/offensive_posts">Offensive</a>
</li>
</ul>
diff --git a/addons/website_forum_doc/views/website_doc.xml b/addons/website_forum_doc/views/website_doc.xml
index 6c14a86d07f..d4e4099d01c 100644
--- a/addons/website_forum_doc/views/website_doc.xml
+++ b/addons/website_forum_doc/views/website_doc.xml
@@ -71,7 +71,7 @@
<div class="form-group">
<input type="search" class="form-control"
name="search" placeholder="Search..."
- t-att-value="search or ''"/>
+ t-att-value="search or None"/>
<button type="submit" class="btn btn-default">Search</button>
</div>
</form>
@@ -110,7 +110,7 @@
<div class="form-group">
<input type="search" class="form-control"
name="search" placeholder="Search..."
- t-att-value="search or ''"/>
+ t-att-value="search or None"/>
<button type="submit" class="btn btn-default">Search</button>
</div>
</form>
diff --git a/addons/website_google_map/views/google_map_templates.xml b/addons/website_google_map/views/google_map_templates.xml
index 6869b5a674e..944bcae5b1b 100644
--- a/addons/website_google_map/views/google_map_templates.xml
+++ b/addons/website_google_map/views/google_map_templates.xml
@@ -9,7 +9,7 @@
<title>World Map</title>
<link rel="stylesheet" type="text/css" href="/website_google_map/static/src/css/website_google_map.css" />
</head>
- <body t-att-data-partner-url="partner_url or ''">
+ <body t-att-data-partner-url="partner_url or None">
<script>
var odoo_partner_data = <t t-raw="partner_data"/>;
</script>
diff --git a/addons/website_hr_recruitment/views/templates.xml b/addons/website_hr_recruitment/views/templates.xml
index 20fa16d6634..f91362ac607 100644
--- a/addons/website_hr_recruitment/views/templates.xml
+++ b/addons/website_hr_recruitment/views/templates.xml
@@ -236,7 +236,7 @@
<ul class="nav nav-pills nav-stacked mb32">
<li t-att-class=" '' if country_id else 'active' "><a t-attf-href="/jobs#{ '/department/%s' % slug(department_id) if department_id else '' }#{ '/office/%s' % office_id if office_id else '' }?all_countries=1">All Countries</a></li>
<t t-foreach="countries" t-as="country">
- <li t-att-class="'active' if country_id and country_id.id == country.id else ''">
+ <li t-att-class="'active' if country_id and country_id.id == country.id else None">
<a t-attf-href="/jobs/country/#{ slug(country) }#{ '/department/%s' % slug(department_id) if department_id else '' }#{ '/office/%s' % office_id if office_id else '' }" ><span t-field="country.name"/></a>
</li>
</t>
@@ -255,7 +255,7 @@
<ul class="nav nav-pills nav-stacked mb32">
<li t-att-class=" '' if department_id else 'active' "><a t-attf-href="/jobs#{ '/country/%s' % slug(country_id) if country_id else '' }#{ '/office/%s' % office_id if office_id else '' }">All Departments</a></li>
<t t-foreach="departments" t-as="department">
- <li t-att-class="'active' if department_id and department_id.id == department.id else ''">
+ <li t-att-class="'active' if department_id and department_id.id == department.id else None">
<a t-attf-href="/jobs#{ '/country/%s' % slug(country_id) if country_id else '' }/department/#{ slug(department) }#{ '/office/%s' % office_id if office_id else '' }" ><span t-field="department.name"/></a>
</li>
</t>
@@ -274,7 +274,7 @@
<ul class="nav nav-pills nav-stacked mb32">
<li t-att-class=" '' if office_id else 'active' "><a t-attf-href="/jobs#{ '/country/%s' % slug(country_id) if country_id else '' }#{ '/department/%s' % slug(department_id) if department_id else '' }">All Offices</a></li>
<t t-foreach="offices" t-as="thisoffice">
- <li t-att-class=" 'active' if office_id == thisoffice.id else '' ">
+ <li t-att-class=" 'active' if office_id == thisoffice.id else None ">
<a t-attf-href="/jobs#{ '/country/%s' % slug(country_id) if country_id else '' }#{ '/department/%s' % slug(department_id) if department_id else '' }/office/#{ thisoffice.id }" >
<span t-field="thisoffice.city"/><t t-if="thisoffice.country_id">,
<span t-field="thisoffice.country_id.name"/>
diff --git a/addons/website_mass_mailing/views/unsubscribe.xml b/addons/website_mass_mailing/views/unsubscribe.xml
index 2fa846703af..b1b1e1e8c2c 100644
--- a/addons/website_mass_mailing/views/unsubscribe.xml
+++ b/addons/website_mass_mailing/views/unsubscribe.xml
@@ -22,7 +22,7 @@
<t t-foreach="contacts" t-as="contact">
<li class="list-group-item">
<input type="checkbox" class="mail_list_checkbox" name="contact_ids"
- t-att-value="contact['id']" t-att-checked="'checked' if contact['opt_out'] == False else ''"/>
+ t-att-value="contact['id']" t-att-checked="'checked' if contact['opt_out'] == False else None"/>
<t t-esc="contact.list_id.name"/>
</li>
</t>
diff --git a/addons/website_membership/views/website_membership.xml b/addons/website_membership/views/website_membership.xml
index 8ea67e2ad91..cd34d1214bf 100644
--- a/addons/website_membership/views/website_membership.xml
+++ b/addons/website_membership/views/website_membership.xml
@@ -33,7 +33,7 @@
<li class="nav-header"><h3>Associations</h3></li>
<li t-att-class="'' if membership_id else 'active'"><a href="/members">All</a></li>
<t t-foreach="memberships_data" t-as="membership_data">
- <li t-att-class="membership_id and membership_data['id'] == membership_id and 'active' or ''">
+ <li t-att-class="membership_id and membership_data['id'] == membership_id and 'active' or None">
<a t-attf-href="/members/association/#{ membership_data['id'] }#{current_country and '/country/%s' % slug(current_country) or ''}#{ search }"><t t-esc="membership_data['name']"/></a>
</li>
</t>
@@ -90,7 +90,7 @@
<ul class="nav nav-pills nav-stacked mt16">
<li class="nav-header"><h3>Location</h3></li>
<t t-foreach="countries" t-as="country">
- <li t-if="country['country_id']" t-att-class="country['country_id'] and country['country_id'][0] == current_country_id and 'active' or ''">
+ <li t-if="country['country_id']" t-att-class="country['country_id'] and country['country_id'][0] == current_country_id and 'active' or None">
<a t-attf-href="/members#{ membership_id and '/association/%s' % membership_id or '' }#{ country['country_id'][0] and '/country/%s' % slug(country['country_id']) or '' }#{ search }"><t t-esc="country['country_id'][1]"/>
<span class="badge pull-right"><t t-esc="country['country_id_count'] or '0'"/></span>
</a>
diff --git a/addons/website_project_issue/views/project_issue_templates.xml b/addons/website_project_issue/views/project_issue_templates.xml
index 27a120cd84c..50fa66c43c4 100644
--- a/addons/website_project_issue/views/project_issue_templates.xml
+++ b/addons/website_project_issue/views/project_issue_templates.xml
@@ -43,7 +43,6 @@
</thead>
<t t-foreach="issues" t-as="issue">
<tr>
-
<td>
<a t-attf-href="/my/issues/#{issue.id}?{{ keep_query() }}">Issue <t t-esc="issue.id"/></a>
</td>
diff --git a/addons/website_quote/views/report_saleorder.xml b/addons/website_quote/views/report_saleorder.xml
index 33da3acf05f..bb70ad82778 100644
--- a/addons/website_quote/views/report_saleorder.xml
+++ b/addons/website_quote/views/report_saleorder.xml
@@ -39,8 +39,8 @@
<strong class="text-right">
<div t-field="option.price_unit"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'
- t-att-style="option.discount and 'text-decoration: line-through' or ''"
- t-att-class="option.discount and 'text-danger' or ''"/>
+ t-att-style="option.discount and 'text-decoration: line-through' or None"
+ t-att-class="option.discount and 'text-danger' or None"/>
<div t-if="option.discount">
<t t-esc="'%.2f' % ((1-option.discount / 100.0) * option.price_unit)"/>
</div>
diff --git a/addons/website_quote/views/website_quotation.xml b/addons/website_quote/views/website_quotation.xml
index 19ea291b2ca..d1b309dc62f 100644
--- a/addons/website_quote/views/website_quotation.xml
+++ b/addons/website_quote/views/website_quotation.xml
@@ -62,8 +62,8 @@
<td class="text-right">
<div t-field="line.price_unit"
t-field-options='{"widget": "monetary", "display_currency": "quotation.pricelist_id.currency_id"}'
- t-att-style="line.discount and 'text-decoration: line-through' or ''"
- t-att-class="(line.discount and 'text-danger' or '') + 'text-right'"/>
+ t-att-style="line.discount and 'text-decoration: line-through' or None"
+ t-att-class="(line.discount and 'text-danger' or '') + ' text-right'"/>
<!-- TODO: apply monetary widget formating -->
<div t-if="line.discount">
<t t-esc="'%.2f' % ((1-line.discount / 100.0) * line.price_unit)"/>
@@ -588,8 +588,8 @@
<strong class="text-right">
<div t-field="option.price_unit"
t-field-options='{"widget": "monetary", "display_currency": "quotation.pricelist_id.currency_id"}'
- t-att-style="option.discount and 'text-decoration: line-through' or ''"
- t-att-class="option.discount and 'text-danger' or ''"/>
+ t-att-style="option.discount and 'text-decoration: line-through' or None"
+ t-att-class="option.discount and 'text-danger' or None"/>
<div t-if="option.discount">
<t t-esc="'%.2f' % ((1-option.discount / 100.0) * option.price_unit)"/>
</div>
diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml
index a4e52cce2ff..3b1df7dd892 100644
--- a/addons/website_sale/views/templates.xml
+++ b/addons/website_sale/views/templates.xml
@@ -42,7 +42,7 @@
</template>
<template id="search" name="Search hidden fields">
- <form t-att-action="keep('/shop'+ ('/category/'+slug(category)) if category else '', search=0)" method="get" t-att-class="search_class">
+ <form t-att-action="keep('/shop'+ ('/category/'+slug(category)) if category else None, search=0)" method="get" t-att-class="search_class">
<t t-if="attrib_values">
<t t-foreach="attrib_values" t-as="a">
@@ -215,7 +215,7 @@
<!-- Add to cart button-->
<template id="categories_recursive" name="Category list">
- <li t-att-class="'active' if c.id == int(category or 0) else ''">
+ <li t-att-class="'active' if c.id == int(category or 0) else None">
<a t-att-href="keep('/shop/category/' + slug(c), category=0)" t-field="c.name"></a>
<ul t-if="c.child_id" class="nav nav-pills nav-stacked nav-hierarchy">
<t t-foreach="c.child_id" t-as="c">
@@ -243,7 +243,7 @@
</template>
<template id="option_collapse_categories_recursive" name="Collapse Category Recursive">
- <li t-att-class="'active' if categ.id == int(category or 0) else ''">
+ <li t-att-class="'active' if categ.id == int(category or 0) else None">
<i t-if="categ.child_id" t-attf-class="text-primary fa #{'fa-chevron-down' if categ.id in parent_category_ids else 'fa-chevron-right'}"/>
<a t-att-href="keep('/shop/category/' + slug(categ), category=0)" t-field="categ.name"></a>
<ul t-if="categ.child_id" class="nav nav-pills nav-stacked nav-hierarchy" t-att-style="'display:block;' if categ.id in parent_category_ids else 'display:none;'">
@@ -280,16 +280,16 @@
<select class="form-control" name="attrib">
<option value=""/>
<t t-foreach="a.value_ids" t-as="v">
- <option t-att-value="'%s-%s' % (a.id,v.id)" t-esc="v.name" t-att-selected="'selected' if v.id in attrib_set else ''"/>
+ <option t-att-value="'%s-%s' % (a.id,v.id)" t-esc="v.name" t-att-selected="v.id in attrib_set"/>
</t>
</select>
</t>
<t t-if="a.type == 'radio'">
<ul class="nav nav-pills nav-stacked">
<t t-foreach="a.value_ids" t-as="v">
- <li t-att-class="'active' if v.id in attrib_set else ''">
+ <li t-att-class="'active' if v.id in attrib_set else None">
<label style="margin: 0 20px;">
- <input type="checkbox" name="attrib" t-att-value="'%s-%s' % (a.id,v.id)" t-att-checked="'checked' if v.id in attrib_set else ''"/>
+ <input type="checkbox" name="attrib" t-att-value="'%s-%s' % (a.id,v.id)" t-att-checked="'checked' if v.id in attrib_set else None"/>
<span style="font-weight: normal" t-field="v.name"/>
</label>
</li>
@@ -303,7 +303,7 @@
<input type="checkbox"
name="attrib"
t-att-value="'%s-%s' % (a.id,v.id)"
- t-att-checked="'checked' if v.id in attrib_set else ''"
+ t-att-checked="'checked' if v.id in attrib_set else None"
t-att-title="v.name"/>
</label>
</t>
@@ -468,7 +468,7 @@
</t>
<t t-if="len(product.product_variant_ids) &gt; 1">
<label label-default="label-default" class="radio" t-foreach="product.product_variant_ids" t-as="variant_id">
- <input type="radio" name="product_id" class="js_product_change" t-att-checked="'checked' if variant_id_index == 0 else ''" t-att-value="variant_id.id" t-att-data-lst_price="variant_id.lst_price" t-att-data-price="variant_id.price"/>
+ <input type="radio" name="product_id" class="js_product_change" t-att-checked="'checked' if variant_id_index == 0 else None" t-att-value="variant_id.id" t-att-data-lst_price="variant_id.lst_price" t-att-data-price="variant_id.price"/>
<span t-esc="variant_id.name_get()[0][1]"/>
<span class="badge" t-if="variant_id.price_extra">
<t t-esc="variant_id.price_extra > 0 and '+' or ''"/><span t-field="variant_id.price_extra" style="white-space: nowrap;" t-field-options='{
@@ -513,7 +513,7 @@
<t t-foreach="variant_id.value_ids" t-as="value_id">
<li class="form-group js_attribute_value" style="margin: 0;">
<label class="control-label" style="margin: 0 20px;">
- <input type="radio" class="js_variant_change" t-att-checked="'checked' if not inc else ''" t-att-name="'attribute-%s-%s' % (product.id, variant_id.attribute_id.id)" t-att-value="value_id.id" style="vertical-align: top; margin-right: 10px;"/>
+ <input type="radio" class="js_variant_change" t-att-checked="'checked' if not inc else None" t-att-name="'attribute-%s-%s' % (product.id, variant_id.attribute_id.id)" t-att-value="value_id.id" style="vertical-align: top; margin-right: 10px;"/>
<span t-field="value_id.name"/>
<span class="badge" t-if="value_id.price_extra">
<t t-esc="value_id.price_extra > 0 and '+' or ''"/><span t-field="value_id.price_extra" style="white-space: nowrap;" t-field-options='{
@@ -536,7 +536,7 @@
<label t-attf-style="background-color:#{value_id.html_color or value_id.name}"
t-attf-class="css_attribute_color #{'active' if not inc else ''}">
<input type="radio" class="js_variant_change"
- t-att-checked="'checked' if not inc else ''"
+ t-att-checked="'checked' if not inc else None"
t-att-name="'attribute-%s-%s' % (product.id, variant_id.attribute_id.id)"
t-att-value="value_id.id"
t-att-title="value_id.name"/>
@@ -951,7 +951,7 @@
<form t-if="website_sale_order and website_sale_order.website_order_line" action="/shop/pricelist" method="post" class="mb32">
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
<div class="input-group">
- <input name="promo" class='form-control' type="text" placeholder="code..." t-att-value="website_sale_order.pricelist_id.code or ''"/>
+ <input name="promo" class='form-control' type="text" placeholder="code..." t-att-value="website_sale_order.pricelist_id.code or None"/>
<div class="input-group-btn">
<a class="btn btn-default a-submit">Apply</a>
</div>
@@ -1062,33 +1062,33 @@
</select>
</div>
</div>
- <div t-if="not only_services" class="js_shipping row mb16" t-att-style="not shipping_id and 'display:none' or ''">
+ <div t-if="not only_services" class="js_shipping row mb16" t-att-style="not shipping_id and 'display:none' or None">
<h3 class="oe_shipping col-lg-12 mt16">Shipping Information</h3>
<div t-attf-class="form-group #{error.get('shipping_name') and 'has-error' or ''} col-lg-6">
<label class="control-label" for="shipping_name">Name (Shipping)</label>
- <input type="text" name="shipping_name" class="form-control" t-att-value="checkout.get('shipping_name', '')" t-att-readonly="'readonly' if shipping_id &gt;= 0 else ''"/>
+ <input type="text" name="shipping_name" class="form-control" t-att-value="checkout.get('shipping_name', '')" t-att-readonly="'readonly' if shipping_id &gt;= 0 else None"/>
</div>
<div t-attf-class="form-group #{error.get('shipping_phone') and 'has-error' or ''} col-lg-6">
<label class="control-label" for="shipping_phone">Phone</label>
- <input type="tel" name="shipping_phone" class="form-control" t-att-value="checkout.get('shipping_phone', '')" t-att-readonly=" 'readonly' if shipping_id &gt;= 0 else ''"/>
+ <input type="tel" name="shipping_phone" class="form-control" t-att-value="checkout.get('shipping_phone', '')" t-att-readonly=" 'readonly' if shipping_id &gt;= 0 else None"/>
</div>
<div t-attf-class="form-group #{error.get('shipping_street') and 'has-error' or ''} col-lg-6">
<label class="control-label" for="shipping_street">Street</label>
- <input type="text" name="shipping_street" class="form-control" t-att-value="checkout.get('shipping_street', '')" t-att-readonly=" 'readonly' if shipping_id &gt;= 0 else ''"/>
+ <input type="text" name="shipping_street" class="form-control" t-att-value="checkout.get('shipping_street', '')" t-att-readonly=" 'readonly' if shipping_id &gt;= 0 else None"/>
</div>
<div class="clearfix"/>
<div t-attf-class="form-group #{error.get('shipping_city') and 'has-error' or ''} col-lg-6">
<label class="control-label" for="shipping_city">City</label>
- <input type="text" name="shipping_city" class="form-control" t-att-value="checkout.get('shipping_city', '')" t-att-readonly=" 'readonly' if shipping_id &gt;= 0 else ''"/>
+ <input type="text" name="shipping_city" class="form-control" t-att-value="checkout.get('shipping_city', '')" t-att-readonly=" 'readonly' if shipping_id &gt;= 0 else None"/>
</div>
<div t-attf-class="form-group #{error.get('shipping_zip') and 'has-error' or ''} col-lg-6">
<label class="control-label label-optional" for="shipping_zip">Zip / Postal Code</label>
- <input type="text" name="shipping_zip" class="form-control" t-att-value="checkout.get('shipping_zip', '')" t-att-readonly=" 'readonly' if shipping_id &gt;= 0 else ''"/>
+ <input type="text" name="shipping_zip" class="form-control" t-att-value="checkout.get('shipping_zip', '')" t-att-readonly=" 'readonly' if shipping_id &gt;= 0 else None"/>
</div>
<div t-attf-class="form-group #{error.get('shipping_country_id') and 'has-error' or ''} col-lg-6">
<label class="control-label" for="shipping_country_id">Country</label>
- <select name="shipping_country_id" class="form-control" t-att-disabled=" 'disabled' if shipping_id &gt;= 0 else ''">
+ <select name="shipping_country_id" class="form-control" t-att-disabled=" 'disabled' if shipping_id &gt;= 0 else None">
<option value="">Country...</option>
<t t-foreach="countries or []" t-as="country">
<option t-att-value="country.id" t-att-selected="country.id == checkout.get('shipping_country_id')"><t t-esc="country.name"/></option>
@@ -1097,7 +1097,7 @@
</div>
<div t-attf-class="form-group #{error.get('shipping_state_id') and 'has-error' or ''} col-lg-6">
<label class="control-label label-optional" for="shipping_state_id">State / Province</label>
- <select name="shipping_state_id" class="form-control" t-att-disabled=" 'disabled' if shipping_id &gt;= 0 else ''">
+ <select name="shipping_state_id" class="form-control" t-att-disabled=" 'disabled' if shipping_id &gt;= 0 else None">
<option value="">State / Province...</option>
<t t-foreach="states or []" t-as="state">
<option t-att-value="state.id" style="display:none;" t-att-data-country_id="state.country_id.id" t-att-selected="state.id == checkout.get('shipping_state_id')"><t t-esc="state.name"/></option>
diff --git a/addons/website_sale_delivery/views/website_sale_delivery.xml b/addons/website_sale_delivery/views/website_sale_delivery.xml
index 5206b573bce..8beffca2b70 100644
--- a/addons/website_sale_delivery/views/website_sale_delivery.xml
+++ b/addons/website_sale_delivery/views/website_sale_delivery.xml
@@ -54,11 +54,11 @@
<template id="country_state_shipping" name="Shipping Country and states" inherit_id="website_sale.checkout">
<!-- By default, with 'ship to the same address', we can only ship to restricted countries & states -->
<xpath expr="//select[@name='country_id']" position="attributes">
- <attribute name="t-att-disabled">not shipping_id and 'disabled' or ''</attribute>
- <attribute name="t-att-style">not shipping_id and 'display: none' or ''</attribute>
+ <attribute name="t-att-disabled">not shipping_id and 'disabled' or None</attribute>
+ <attribute name="t-att-style">not shipping_id and 'display: none' or None</attribute>
</xpath>
<xpath expr="//select[@name='country_id']" position="after">
- <select name="country_id" class="form-control o_provider_restricted" t-att-style="shipping_id and 'display:none' or ''" t-att-disabled="shipping_id and 'disabled' or ''">
+ <select name="country_id" class="form-control o_provider_restricted" t-att-style="shipping_id and 'display:none' or None" t-att-disabled="shipping_id and 'disabled' or None">
<option value="">Country...</option>
<t t-foreach="shipping_countries or []" t-as="country">
<option t-att-value="country.id" t-att-selected="country.id == checkout.get('country_id')"><t t-esc="country.name"/></option>
@@ -66,11 +66,11 @@
</select>
</xpath>
<xpath expr="//select[@name='state_id']" position="attributes">
- <attribute name="t-att-disabled">not shipping_id and 'disabled' or ''</attribute>
- <attribute name="t-att-style">not shipping_id and 'display: none' or ''</attribute>
+ <attribute name="t-att-disabled">not shipping_id and 'disabled' or None</attribute>
+ <attribute name="t-att-style">not shipping_id and 'display: none' or None</attribute>
</xpath>
<xpath expr="//select[@name='state_id']" position="after">
- <select name="state_id" class="form-control o_provider_restricted" t-att-style="shipping_id and 'display:none' or ''" t-att-disabled="shipping_id and 'disabled' or ''">
+ <select name="state_id" class="form-control o_provider_restricted" t-att-style="shipping_id and 'display:none' or None" t-att-disabled="shipping_id and 'disabled' or None">
<option value="">Select...</option>
<t t-foreach="shipping_states or []" t-as="state">
<option t-att-value="state.id" style="display:none;" t-att-data-country_id="state.country_id.id" t-att-selected="state.id == checkout.get('state_id')"><t t-esc="state.name"/></option>
diff --git a/addons/website_sale_options/views/templates.xml b/addons/website_sale_options/views/templates.xml
index b9aba78f23c..cf262d3abfb 100644
--- a/addons/website_sale_options/views/templates.xml
+++ b/addons/website_sale_options/views/templates.xml
@@ -15,7 +15,7 @@
<attribute name="t-if">not line.linked_line_id</attribute>
</xpath>
<xpath expr="//table[@id='cart_products']/tbody//tr" position="attributes">
- <attribute name="t-att-class">'optional_product info' if line.linked_line_id else ''</attribute>
+ <attribute name="t-att-class">'optional_product info' if line.linked_line_id else None</attribute>
</xpath>
<xpath expr="//table[@id='cart_products']/tbody//td[@id='td-qty']" position="inside">
<t t-if="line.linked_line_id">
diff --git a/addons/website_slides/view/website_slides.xml b/addons/website_slides/view/website_slides.xml
index 1700244ed18..cab177361d2 100644
--- a/addons/website_slides/view/website_slides.xml
+++ b/addons/website_slides/view/website_slides.xml
@@ -494,7 +494,7 @@
</div>
<div class="mt8 mb32">
<ul class="nav nav-tabs" role="tablist">
- <li t-att-class="not comments and 'active' or ''">
+ <li t-att-class="not comments and 'active' or None">
<a href="#about" role="tab" data-toggle="tab">
<i class="fa fa-home"></i> About
</a>
@@ -504,7 +504,7 @@
<i class="fa fa-share-alt"></i> Share
</a>
</li>
- <li t-att-class="comments and 'active' or ''">
+ <li t-att-class="comments and 'active' or None">
<a href="#discuss" role="tab" data-toggle="tab">
<i class="fa fa-comments-o"></i> Comments
</a>