Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2 Respostas
16367 Visualizações

Hello, I would like to know how to open a form with an existing record in Edit mode.  The form is called when I return a dictionary from a method like this:

return {
            'name': 'Name',
            'view_type': 'form',
            'view_mode': 'form',
            'view_id': 100,
            'res_model': 'sale.order.line',
            'res_id': 1,
            'type': 'ir.actions.act_window',
            'context': context,
        }

Is there another key I can assign with some value that opens this form in Edit mode?

Avatar
Cancelar
Melhor resposta

For Odoo 11 

'context': {'form_view_initial_mode': 'edit', 'force_detailed_view': 'true'},
Avatar
Cancelar

This worked for me in Odoo 13

Great, this worked for me in Odoo 14

Melhor resposta

Hi!

 

return {
            'name': 'Name',
            'view_type': 'form',
            'view_mode': 'form',
            'view_id': 100,
            'res_model': 'sale.order.line',

            'target: 'inline',

            'res_id': 1,
            'type': 'ir.actions.act_window',
            'context': context,
        }

More information in: openerp-apps.blogspot.mx

 

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
mar. 15
3160
0
ago. 23
1692
0
dez. 19
6267
1
mar. 15
9884
1
mar. 15
6742