コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
16448 ビュー

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

 

アバター
破棄
関連投稿 返信 ビュー 活動
1
3月 15
3209
0
8月 23
1779
0
12月 19
6348
1
3月 15
9971
1
3月 15
6820