I am using Odoo 12's enterprise version code for customization and I need to redirect to the homepage (web#home) from a wizard upon clicking the cancel button. I searched a lot to find the menu_id or action which calls the homepage to return it from a python method, but I could not find it. Is there any way to do this or not? Below is my code in python file where I want to return the action or menu of the homepage:
def action_cancel(self):
return {
'name': _("Main Menu"),
'type': 'ir.actions.client',
'tag': 'reload',
}
Simply you can use ir.actions.act_url
Eg:
def action_cancel(self):
return {
'type': 'ir.actions.act_url',
'target': 'self',
'url': '/home'
}