跳至內容
選單
此問題已被標幟
2 回覆
16288 瀏覽次數

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
3123
0
8月 23
1649
0
12月 19
6230
1
3月 15
9818
1
3月 15
6696