Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
5182 Visualizzazioni

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'}
Avatar
Abbandona

your code is correct, any logs preventing the trigger

Autore

No, And i want that this form should show "Sales Orders" string on Top left side.

Post correlati Risposte Visualizzazioni Attività
0
ott 22
2489
0
ott 22
2046
0
ago 22
2457
1
lug 22
20160
0
apr 22
3102