Odoo Help


I have set group by in field Quotation / Order report in 7.0?

Farid Ghanchi
on 6/10/13, 11:01 PM 2,644 views

I have add one field category in my test module. Now I want to print report(quatation/order) and i have display product category wise print. Suppose 1.Services,2.Delivery Report will print in 10 products in services and 5 products in Delivery just like summurrywise

                     ITEM        |    Total
                     Services    |      10
                     Delivery    |       5
                     Total       |      15
Is this possible ?


Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 




Sudhir Arya
ERP Harbor Consulting Services
Sudhir Arya (ERP Harbor Consulting Services)
On 6/11/13, 9:35 AM

You have to create your own report which will print reports Category wise.

I mean in report 1st table will be for Category A with its Products and 2nd table for Category B with its Products.

I have edit quatation/order default in sale. I have add field category in my new addons.

Farid Ghanchi
on 6/11/13, 9:39 AM

You mean you want to create one more table that contains Category Name and Total Number of Products in that category? Am I right?

Sudhir Arya (ERP Harbor Consulting Services)
on 6/12/13, 3:11 AM

I have add one field categ_type in sale.order.line Now we print only this categ_type its contain no of product suppose Delivery 10 products. how I print this group_by. I hope you got it.

Farid Ghanchi
on 6/12/13, 4:50 AM
Farid Ghanchi
On 6/15/13, 8:57 AM

Solve my issue for in create one method retrive data from postgrey and set in to rml that return dict.

def get_val(self, obj):
        query = """
           SELECT  categ_type as name, sum(product_uom_qty * price_unit) as total
           FROM sale_order_line 
           WHERE order_id = %s GROUP BY categ_type
        data = self.cr.dictfetchall()
        for t in data:
           dict={'name' : t['name'], 'total' : t['total']}
        return res 

repeatIn[o.get_val(o), 'p']

[[ p['name'] ]] [[ p['total'] ]]

Which script have you changed especially the place where you created this function.

on 12/12/13, 7:25 AM

In my custom module.Thanks

Farid Ghanchi
on 12/12/13, 8:43 AM

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 6/10/13, 11:01 PM
Seen: 2644 times
Last updated: 3/16/15, 8:10 AM