Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/30/13, 10:39 PM|
|Seen: 4547 times|
|Last updated: 3/16/15, 8:10 AM|