Hello,
I have a custom module that adds an item to the "More" button dropdown from the tree view. The item calls a function which creates a new sales order like it's supposed to do. The problem is, I would like to open the Sales Order form after the record is created, but for some reason it isn't doing that.
Here is my return statement
return {
'name': 'Sale Order',
'view_type': 'form',
'view_mode': 'form',
'view_id': self.pool.get('ir.ui.view').search(cr, uid, [('name','=','sale.order.form')])[0],
'res_model': 'sale.order',
'res_id': new_order_id,
'type': 'ir.actions.act_window',
}
This block of code works for other things, but it doesn't work when opening a form from a tree view that calls a function when an item in the "More" dropdown menu is clicked.