Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
16355 มุมมอง

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
3158
0
ส.ค. 23
1687
0
ธ.ค. 19
6264
1
มี.ค. 15
9879
1
มี.ค. 15
6733