تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
2639 أدوات العرض

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!

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أغسطس 25
493
0
أغسطس 25
282
0
يوليو 25
1291
0
يوليو 25
3
0
يوليو 25
6