Odoo Help


I created a custom report of sales quotation. But the original quotation report is displaying in my quotation button. Code is posted here.Any one plz help

on 11/24/14, 2:50 AM 887 views

Module : quotation

quotation- __openerp__.py

'data': [

quotation- quotation_report.xml    

<?xml version="1.0" encoding="utf-8"?>

        <report auto="False" id="report_quotation_sale" model="sale.order" name="sale.order"
                rml="quotation_report/report/quotation_report.rml" string="Sales Quotation"


quotation- report -__init__.py

import quotation

quotation- report - quotation.py

import time
from openerp.report import report_sxw
from openerp.osv import osv
from openerp import pooler

class quotation_report(report_sxw.rml_parse):
    def __init__(self, cr, uid, name, context=None):
        super(quotation_report, self).__init__(cr, uid, name, context=context)
            'time': time,
report_sxw.report_sxw('sale.order.rndU7tBJ','sale.order','addons/quotation_report/report/quotation_report.rml',parser=quotation_report, header="external")

quotation- report - quotation_report.rml

What was the error in my code? This rml is entirely different from sale quotation report, then how is displaying the same report.



| 5 4 6
Zagreb | Karlovac, Croatia

there is only 10 kind of people the ones that understand binary ... and others

On 11/24/14, 4:06 AM

You did everything right, except you never actualy caaled your report...
As i can se you are dealing with sales orders...
Now, go to sale module, and check sale_order class, method print_quotation -> this is called from button print quotation.. and you need to override this method, 

AND / OR you need to define new or override existing report server action ( print from More menu on top of creen)
(check in module sale:  sale/sale_report.xml )

Hope ti helps :)

I got the button, but its print the original quotation file not my report.

on 11/24/14, 5:15 AM

treu.. but you still need to override method that calls print quotation with your parameters (report name, paths etc) so it can call your report instead of standard one..

on 11/24/14, 6:24 AM

Thanks for your response Bole. But still i didnt get you.

on 11/24/14, 7:23 AM


| 5 3 6
Jakarta, Indonesia
On 11/24/14, 4:05 AM

Rosey, are you by any chance use the same Report Name (sale.order) with the original report?  If so, there's the problem.  Report is defined uniquely by it's name.

Your Answer

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.


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

1 follower(s)


Asked: 11/24/14, 2:50 AM
Seen: 887 times
Last updated: 3/16/15, 8:10 AM