Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
16256 Vistas

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
Descartar
Mejor respuesta

For Odoo 11 

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

This worked for me in Odoo 13

Great, this worked for me in Odoo 14

Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
mar 15
3115
0
ago 23
1621
0
dic 19
6187
1
mar 15
9800
1
mar 15
6667