Skip to Content
Menu
This question has been flagged
1 Reply
6765 Views

I have created a Web Planner for custom module and I want to launch/open planner as soon as user reload/refresh(On page load) the page. How can we achieve it using Javascript code?

Below is current record which is used to trigger Odoo planner.


    <record id="planner_template" model="web.planner">

<field name="name">Temp</field>

<field name="view_id" ref="test_planner"/>

<field name="menu_id" ref="allip_base_config.communications_studio_main_menu"/>

<field name="planner_application">planner_temp</field>

<field name="tooltip_planner"><![CDATA[

Plan your communication strategy: objectives, leads, KPIs, and much more!

]]>

</field>

</record>

Avatar
Discard
Best Answer

call the related action from js using odoo's js function to trigger action ie, do_action()

example:

this.action_manager.do_action({
name: name,
res_model: model,
views: [[false, 'list'], [false, 'form']],
type: 'ir.actions.act_window',
view_type: "list",
view_mode: "list",
target: "new"
});

Like this you can call your action. which will popup the above view.


Avatar
Discard

Hello Niyas, I am using this function for res_model: 'crm.lead' and i want to open Pipeline menu action but now it open me Lead menu action. So, can you help me?

Below link of problem on odoo forum

https://www.odoo.com/es_ES/forum/ayuda-1/question/how-to-customize-the-onclick-javascript-action-of-an-xml-form-button-odoo-11-126024