Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
16320 Переглядів

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?

Аватар
Відмінити
Найкраща відповідь

For Odoo 11 

'context': {'form_view_initial_mode': 'edit', 'force_detailed_view': 'true'},
Аватар
Відмінити

This worked for me in Odoo 13

Great, this worked for me in Odoo 14

Найкраща відповідь

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

 

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
Change form methode Вирішено
1
бер. 15
3139
0
серп. 23
1673
0
груд. 19
6244
1
бер. 15
9838
1
бер. 15
6711