Hello !
I have a bit of a problem, I want to generate some to retrieve the binary of my pdf and then display it to the user.
but with this request :
$reportName = 'account.report_invoice';
$data = $encoder->encode([[$this->erp_invoice_id], $reportName]);
$client = new Client($this->config['server_url'] . 'object');
$client->setOption(Client::OPT_RETURN_TYPE, XMLParser::RETURN_PHP);
$response = $client->send(
new Request('execute_kw', [
new Value($this->config['database']),
new Value($this->config['uid'], Value::$xmlrpcInt),
new Value($this->config['pass']),
new Value('report'),
new Value('get_pdf'),
$data
])
);
I get this error :
Error fetching PDF: Invalid response payload (you can use the setDebug method to allow analysis of the response) XML error 9: Invalid character at line 9, column 13
I have the impression that the problem comes from the data I'm receiving, but how do I manage this?
Thanks for your help !