Hi everyone,
I would like to request a guidance on how to generate a pdf report file output from server module.
I have a reference client module code here:
print_invoice_btn.click(function(){
task.reports.order_invoice.id.value = item.order_id.lookup_value;
task.reports.order_invoice.print();
});
I need to do the same but only to generate the pdf file and getting the filename to be processed on subsequent steps.
When I tried something like this:
item.task.order_invoice.id.value = order_id
item.task.order_invoice.generate(item.task.order_invoice)
Following errors returned:
TypeError: generate() missing 2 required positional arguments: 'url' and 'ext'
I couldn't understand what that means and going through
https://jam-py.com/docs/refs/server/report/m_generate.html doesn't help me in this case.
Some threads I have been looking at but it seems it still require the report generation to be triggered from the client module:
Please let me know if further details are needed.
Thank you.