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.
Try this .
write a function in your report model to run sql statement and return the result , so u can pass sql qry from Qweb Report,
def run_sql(self, qry):
_res = self._cr.dictfetchall()
<t t-foreach="docs" t-as="o">
<t t-set="emp_count" t-value="o.run_sql('select COUNT(*) from hr_employee')"/>
<t t-set="latest_partner" t-value="o.run_sql('select id, name from res_partner order by id DESC limit 10')"/>
<p > Employee Count: <span t-esc="emp_count" /> </p>
<t t-foreach="latest_partner" t-as="part">
<p> Customer - <span t-esc="part_index"/>: <span t-esc="part"/> </p>
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: 12/12/14, 12:44 PM|
|Seen: 2096 times|
|Last updated: 3/16/15, 8:10 AM|