This question has been flagged

Hello odooers,

I want to  Create a wizard that can select single/multiple products and dates then it will produce a pdf report that contains its product move.
The report should contain Date, Reference(WH/in or out or inventory adjustment), sale price, cost price, customer/vendor name, stock in, out, balance.
The sample report format is given below.

        Any one has any idea how doing this?


Avatar
Discard
Best Answer

Hello alfik,


you can put below code inside save method of your wizard to print report..

Find code in comment.

If you want us to customise this report please don't hesitated to contact us.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Avatar
Discard

class MyWizard(models.Model):
_name = 'my.wizard'

@api.multi
def action_confirm(self):
context = {
'lang': 'en_US',
'active_ids': [self.id],
'tz': False,
'uid': 1
}
return {
'context': context,
'data': None,
'type': 'ir.actions.report.xml',
'report_name': 'module_name.report_template_id',
'report_type': 'qweb-pdf',
'report_file': 'module_name.report_template_id',
'name': 'product_report',
}

class MyWizard(models.Model):
_name = 'my.wizard'

@api.multi
def action_confirm(self):
context = {
'lang': 'en_US',
'active_ids': [self.id],
'tz': False,
'uid': 1
}
return {
'context': context,
'data': None,
'type': 'ir.actions.report.xml',
'report_name': 'module_name.report_template_id',
'report_type': 'qweb-pdf',
'report_file': 'module_name.report_template_id',
'name': 'product_report',
}

Author

Hello jainesh ,
Thanks for Your help.
can you explain this codes?