1
votes

Is it possible to display a search sql statement output in QWEB report?

In popup I want add field date, quanatity after choose date and quantity on button click call "SELECT * FROM 123 WHERE date = field date AND quantity = field quantity.

Any simple solution?

1

1 Answers

0
votes

Yes it is.

For this you have to extend create a model that the template uses to fetch data and override the render_html method.

For an example of this take a look at addons/account_extra_reports/report/account_journal.py The docargs are the variables that will be available to you inside the template to use. See the _get_taxes method that performs and sql query and formats the data accordingly.