[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>
This commit is contained in:
Nicolas Lempereur
2019-05-16 14:37:20 +00:00
parent d5b8215b24
commit 838d557eaf
2 changed files with 2 additions and 1 deletions
@@ -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",
+1 -1
View File
@@ -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&amp;website_id=#{website.id if website else ''}&amp;url_return=#{url_return}">
<i class="fa fa-plus-circle"/>
Add a language...