Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
28508 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Eric,

On the button click, write a method which returns:

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

Thanks.

Ảnh đại diện
Huỷ bỏ

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

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?

Hi Thanks for your help. It works for me.

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 9 23
3523
2
thg 9 23
4695
2
thg 12 21
12607
1
thg 11 19
5664
2
thg 12 16
14783