[FIX] website: GA key

`_` is not available when loading this part of the template, leading to
an error on `_.str.trim()`.

We can simply use `trim()` to do so. By the way, `google_analytics_key`
is now trimmed automatically when adding it in the settings, so this is
only useful for migrated databases.

Fixes #38891
opw-2089296

closes odoo/odoo#39269

X-original-commit: a492047e9a064beecbe0611c3f7aef5172406eb1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
Nicolas Martinelli
2019-10-23 15:09:03 +00:00
committed by fw-bot
parent 3db9ce5b50
commit d6c54f4311
+1 -1
View File
@@ -294,7 +294,7 @@
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', _.str.trim('<t t-esc="website.google_analytics_key"/>'), 'auto');
ga('create', '<t t-esc="website.google_analytics_key"/>'.trim(), 'auto');
ga('send','pageview');
</script>
</xpath>