Odoo Help

1

How to close wizard/dialog dynamically on button click?

By
Eric
on 8/14/14, 7:53 PM 4,218 views

Hello, I am having a hard time closing the open dialogs when I click a button to go to another form.  the dialogs open when I click on a one2many line item, then that dialog has a button which opens a form.  the problem is when i click the button to open the form, the current dialogs that are open don't close.  Can someone tell me how to close an open dialog on a button click?

1

Eric,

On the button click, write a method which returns:

return {'type': 'ir.actions.act_window_close'}

Thanks.

Hi Serpent Consulting Services Pvt. Ltd, I trying to print a report from the button and close that wizard. Any idea to achieve this.

Karthik Arumugam
on 3/14/16, 7:03 AM

So I have to return this to have the pdf : return self.env['report'].get_action(record_to_print, 'account.report_invoice') , but how do I close the wizard after this?

Versão Integral, Anabela Damas
on 6/16/16, 10:27 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 8/14/14, 7:53 PM
Seen: 4218 times
Last updated: 3/15/16, 6:32 AM