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

Hi!

I'd like to open a qview when I click on a button.

The easy way would be to call the action as I do for a another QView but in this case I have ton run a Python code before so I have to open this view from the python code.


But as it's a Qview I don't have the informations like the model, etc. I just have the information from the action which is:

        <record  id="die_devis.client_devis_qview" model="ir.actions.client">
            <field name="name">Devis</field>
            <field name="tag">die_devis.devis</field>
            <field name="target">main</field>
        </record>


I  tried this, but It doesn't worked:

        return {
            'name''Devis',
            'view_id''die_devis.client_devis_qview',
            'type''ir.actions.client',
            'target':'main'
        }


Do you over solution please ? 


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi Theo!

This should be enough:

return {
    'type': 'ir.actions.client',
    'tag': 'die_devis.devis',
    'target': 'main'
}

Regards,
Ivan

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hi Ivan!

Thank you very much for your answer, it works perfectly

อวตาร
ละทิ้ง

Glad it help!

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ส.ค. 25
518
0
ส.ค. 25
299
0
ก.ค. 25
1316
0
ก.ค. 25
3
0
ก.ค. 25
6