In a One2many field I added a button to navigate to a relation module. I found out how to clear the breadcrumb, but cannot get the menu_id to change.
def open_one2many_line(self):
context = self.env.context
return {
'type': 'ir.actions.act_window',
'views': [[False, "form"]],
'target': 'main',
'res_model': self._name,
'res_id': context.get('default_active_id'),
'menu_id': "90"
}
I tried adding menu_id into the return value of my action function. It had no effect.
Hope this idea will help: http://learnopenerp.blogspot.com/2020/01/open-wizard-on-button-click-in-odoo.html