Hello,
I need to automate the task of generating a report of the POS statistics.
The same as decribed here: https://www.odoo.com/documentation/user/9.0/point_of_sale/analyze/statistics.html
I'm developing a simple script on PHP using a XMLRPC lib (ripcord) but when I try to access to the model "report.pos.order" using the 'search' function it doesn't return any report instead it gives me all the orders IDs.
Is there any way to auto generate the report and at the same time using some criteria for filtering by products or date using the API?
I also followed the "Report Printing" section in https://www.odoo.com/documentation/9.0/api_integration.html
It doesn't work for me with the "report.pos.order" model.
I would like to get the data in XML or CSV or even a raw array or objects instead of a PDF so I can manipulate it.
Example code I'm using (PHP):
$url = "https://myerp.my";
$db = "my_db";
$username = "user";
$password = "pass";
$common = ripcord::client("$url/xmlrpc/2/common");
$uid = $common->authenticate($db, $username, $password, []);
$models = ripcord::client("$url/xmlrpc/2/object");
$report = $models->execute_kw($db, $uid, $password, 'report.pos.order', 'search', array(array()));
I would appreciate any help!
Thank you!
Technical Details:
- PHP 7.1
- Odoo 9.0c
- Ripcord: https://github.com/DarkaOnLine/Ripcord