I want to open view by using the js file,
code:
res = self.pool['ir.model.data'].get_object_reference(cr, uid, 'my_module', 'my_view_id')
return {
'view_type': 'form',
'view_mode': 'form',
'view_id': res[1],
'res_model': '',
'type': 'ir.actions.act_window',
'target': 'current',
}
I created python function which returns the view, but as I am returning the view it is return to the JS and not opening the view. So, I want to know that how to open this view from the JS. As some tree view are opening in POS using JS but I am not getting how to open Graph view or Form View.