Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
16403 Представления

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 Ответы Просмотры Активность
1
мар. 15
3182
0
авг. 23
1716
0
дек. 19
6295
1
мар. 15
9922
1
мар. 15
6774