Hello All,
I want to return Sales Orders view from Quotation screen by clicking button. This button visible when order confirmed. i want that after clicking this button screen moves in "Sales Orders" Menu. So, Please provide any solution for this problem.
Thanks in advance,
My Python code is here:
@api.multi
def test_button(self):
ir_model_data = self.env['ir.model.data']
try:
view_id = ir_model_data.get_object_reference('sale', 'view_order_form')[1]
except ValueError:
view_id = False
record_id = self.env['sale.order'].search([('id', '=', self.id)])
print "RECORD", view_id, record_id
return {
'name': record_id.name,
'view_type': 'form',
'view_mode': 'form',
'views': [(view_id, 'form')],
'res_model': 'sale.order',
'view_id': view_id,
'type': 'ir.actions.act_window',
'res_id': record_id.id,
'target': 'fullscreen'}
your code is correct, any logs preventing the trigger
No, And i want that this form should show "Sales Orders" string on Top left side.