Skip to Content
Menu
This question has been flagged
1 Reply
7111 Views

Hello Community

I want to print a report from button that call an wizard form ,this wizard contains some fields that i want to display in report , how to call the action to print from wizard ?

Avatar
Discard
Best Answer

Hello MouBou,

Please use below method to get report from wizard.

def print_report(self, cr, uid, ids, context=None):

    datas = {} if context is None:

        context = {} data = self.read(cr, uid, ids)[0] datas = { 'ids': [], 'model': 'object.object', 'form': data }

return {'type': 'ir.actions.report.xml', 'report_name': 'your_report_name', 'datas': datas} 

Hope this help you.

Avatar
Discard
Author

Thank You Ankit, but how to write it using api 8 in odoo 9 ??