Odoo Help

Welcome!

This community 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.

1

How to close wizard/dialog dynamically on button click?

By
Eric
on 8/14/14, 7:53 PM 3,192 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

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
4341
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 8/15/14, 8:44 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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