I want to create menu like Reporting/Point of sale/Sale Details and print my report while clicking Print Report button. I have created a report which comes under Settings/Technical/Actions/Reports.How can i integrate my report to button click and how to create pop up? Any one please help?

the datas dict will be passed to your report , with three keys: model, ids of this model, and form which contains the wiz_data
could be like this:

datas = {
'ids': res_ids,
'model': 'model.name',
'form': wiz_data,
}

now your report has all information needed,

the "objects" contains a browse record of the given ids on datas dict...
also you can use the wizard information in your report like this:

if you want to print e.g this report from date ... to date ...

you can use:

[[ data['form']['from_date'] ]] and [[ data['form']['to_date'] ]]

remember, the form contains your fetched wizard's data ...

also you can filter your data using the report python file by declaring a function to do some filtering...

it depends on your requirements , and it will be a performance issue to filter your data on the wizard function's or in a report's python file [for e.g you'll use the returns values in another function on the python file]....

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