diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2019-05-16 14:20:40 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2019-05-16 14:37:20 +0000 |
| commit | 838d557eafd04a81086eb7ebe3fe280ff366cb73 (patch) | |
| tree | 13436f7d84b8d051de3b1f91f6d8789b93cf3c3b | |
| parent | d5b8215b24210b1f2cc3873f79a0ecdc85477398 (diff) | |
[FIX] website: rte_translator ok in manual & debug
The rte_translator tour that test translation on the frontend could not
be started from the "[debug menu]" > "Start Tour" for two reasons:
- the start URL is not specified, so the test was started on current
backend page wich is wrong (in python the start url is "/")
- the backend original state (params after #) does not work with ?k=v
inside argument value, so `#return_url=/?debug=true`.
To solve this issue, we encode the return_url value and add a start url
when rte_translator is started manually.
opw-1998623
closes #33443
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
| -rw-r--r-- | addons/website/static/src/js/tours/rte.js | 1 | ||||
| -rw-r--r-- | addons/website/views/website_templates.xml | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/addons/website/static/src/js/tours/rte.js b/addons/website/static/src/js/tours/rte.js index 67426a64303..58ddca69424 100644 --- a/addons/website/static/src/js/tours/rte.js +++ b/addons/website/static/src/js/tours/rte.js @@ -6,6 +6,7 @@ var base = require('web_editor.base'); tour.register('rte_translator', { test: true, + url: '/', wait_for: base.ready(), }, [{ content: "click on Add a language", diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index cc7cff9ca93..a3bd1d3f246 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -401,7 +401,7 @@ </div> </li> <li groups="website.group_website_publisher" class="list-inline-item"> - <t t-set="url_return" t-value="url_for('', '[lang]') + '?' + keep_query()"/> + <t t-set="url_return" t-value="quote_plus(url_for('', '[lang]') + '?' + keep_query())"/> <a t-attf-href="/web#action=base.action_view_base_language_install&website_id=#{website.id if website else ''}&url_return=#{url_return}"> <i class="fa fa-plus-circle"/> Add a language... |
