[FIX] website, web: fix opening configurator after installing website module
Before that commit, opening the client action was not possible directly after installing the website module (the client action javscript class was not yet added to the actions registry). An action_id param is added to the reload action, so that it can open the website configurator after reloading the webclient. See merge commit for more information. task-2687506
This commit is contained in:
@@ -130,6 +130,7 @@ function redirect (url, wait) {
|
||||
function Reload(parent, action) {
|
||||
var params = action.params || {};
|
||||
var menu_id = params.menu_id || false;
|
||||
var action_id = params.action_id || false;
|
||||
var l = window.location;
|
||||
|
||||
var sobj = $.deparam(l.search.substr(1));
|
||||
@@ -141,6 +142,11 @@ function Reload(parent, action) {
|
||||
var hash = l.hash;
|
||||
if (menu_id) {
|
||||
hash = "#menu_id=" + menu_id;
|
||||
if (action_id) {
|
||||
hash += "&action=" + action_id;
|
||||
}
|
||||
} else if (action_id) {
|
||||
hash = "#action=" + action_id;
|
||||
}
|
||||
var url = l.protocol + "//" + l.host + l.pathname + search + hash;
|
||||
|
||||
|
||||
@@ -656,10 +656,15 @@
|
||||
<field name="target">fullscreen</field>
|
||||
</record>
|
||||
|
||||
<record id="action_open_website_configurator" model="ir.actions.client">
|
||||
<field name="name">Open Website Configurator</field>
|
||||
<field name="tag">reload</field>
|
||||
<field name="params" eval="{'action_id': ref('website_configurator'), 'menu_id': ref('menu_website_configuration')}"/>
|
||||
</record>
|
||||
|
||||
<record id="website_configurator_todo" model="ir.actions.todo">
|
||||
<field name="name">Start Website Configurator</field>
|
||||
<field name="action_id" ref="website_configurator"/>
|
||||
<field name="sequence">0</field>
|
||||
<field name="action_id" ref="action_open_website_configurator"/>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user