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.

0

How to close the wizard automatically in odoo8?

By
Bailey
on 2/23/16, 12:12 AM 562 views

In my case, the wizard is not closing automatically in odoo8. Using wizard for printing purpose, after printing the wizard is not close automatically.

### 'nodestroy': True, is not working in odoo8.

@api.multi

def account_write_check_number(self):

     records = self.env['account.voucher'].browse(voucher_ids)

         if self.current_check_no:

              records.write({'number': self.check_number})

    report_obj = self.env['report'].with_context(active_ids=voucher_ids)

    report_name = 'account_check_writing.report_check'

    return report_obj.get_action(records, report_name)

the above method is wrote in button for printing purpose, printing is fine, but i cant close the wizard automatically..


What are you doing? could you post your code?

Axel Mendoza
on 2/23/16, 12:59 AM
0
Krupesh Laiya
On 2/25/16, 3:52 AM

Please use this

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

Baiju

--Baiju--
3154
| 5 4 8
Kochi, India
--Baiju--
ODOO technical and functional

        I like learning new thing, especially technical thing. I am a quick learner, I can learn technical things very fast. I have good logical skill,  I have immense interest in programming.

e-mail id : baijuks@hotmail.com

Baiju
On 2/23/16, 6:51 AM

Hi Bailey,

For closing window try this:

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


Hope this helps.




Hi sorry, I wrongly put the method,

Bailey
on 2/23/16, 7:10 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: 2/23/16, 12:12 AM
Seen: 562 times
Last updated: 2/25/16, 3:52 AM