I'm in a progress of developing dashboard mobile app for iOS and Android. I'm also aware of analytic & report objects such as: - purchase.report - sale.report - account.invoice.report - etc.
Pulling each record to mobile device and aggregates them in the mobile device would be inefficient. How can I perform aggregate functions such as SUM,AVG,MIN,MAX in the server side?
I wanted to avoid modifying views, adding modules, etc to the OpenERP installation; as I would like the mobile app to be as universal as possible without too much modification on the OpenERP base installation.
It would be also nice if I can run SQL statements via XML-RPC web service calls. Can it be done?
It is possible to run SQL commands, but I think that requires you to make your own module.
According to this site, you can use Query objects, maybe that is what yo are looking for?
More specific, this part of the above page is talking about aggregation-grouping.
Update Within openERP, all models extend osv.BaseModel. If you want to know more about the possible methods, read through the source code, or check the following site, which has made HTML documentation out of the source code. You have to look under Namespaces -> Namespace List -> openERP -> osv. One of the things defined here is query (what you are looking for I think). Another thing defined here is BaseModel, which has quite some API interfaces defined.
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
|Asked: 5/30/13, 10:39 PM|
|Seen: 4402 times|
|Last updated: 3/16/15, 8:10 AM|