Skip to Content
Menú
This question has been flagged
2 Respostes
16302 Vistes

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
Best Answer

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

Best Answer

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
Related Posts Respostes Vistes Activitat
1
de març 15
3133
0
d’ag. 23
1663
0
de des. 19
6237
1
de març 15
9827
1
de març 15
6708