Is it possible in Odoo to redirect to my module's view on my module's installation?

Question:

I have created a module called ‘Ticket Booking’ and I want to redirect to that module whenever it is installed or upgraded.

NB : I want similar functioning like what happens when we install website in Odoo.

I have tried to achieve it by modifying several JavaScript and Python hooks but i couldn’t.

Asked By: Lloyd

||

Answers:

You can use todo actions like in website module:

<record id="website_configurator_todo" model="ir.actions.todo">
    <field name="name">Start Website Configurator</field>
    <field name="action_id" ref="start_configurator_act_url"/>
    <field name="sequence">0</field>
</record>

Set a value of the state field to open to force Odoo to execute the action on module upgrade:

<field name="state">open</field>
Answered By: Kenly
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.