[FIX] theme_*: check cta_btn_text is not False before applying upper

The themes cobalt, paptic and vehicle apply upper on cta_btn_text for some
snippets. In some case cta_btn_text is a boolean (False) and not a string.
We must check cta_btn_text is not False before calling upper on it.

task-2518565

closes odoo/design-themes#33

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
Sébastien Mottet (oms)
2021-07-07 08:52:07 +00:00
parent 1e6f937fce
commit e05e835b28
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -169,7 +169,7 @@
<!-- ==== Call To Action ===== -->
<template id="s_call_to_action" inherit_id="website.s_call_to_action" name="Cobalt s_call_to_action">
<xpath expr="//t[@t-esc='cta_btn_text']" position="replace">
<t t-esc="cta_btn_text.upper()">START NOW</t>
<t t-esc="cta_btn_text and cta_btn_text.upper()">START NOW</t>
</xpath>
</template>