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.
My Modul for OpenERP 6.1 do not work with OpenERP 7.0 .
I believe the problem is the declaration 'report_name': 'sale.order' in the print_quotation method. (Report name instead of report id)
I used for my report the same name, as quick fix. This works, but i have problems with the translation (my po file is not used).
I want replace the "print" button with my own version and call my own "print_quotation_new" method, but i can not evaluate the consequences (for workflows or whatever).
You can override the default report like below
1) Create a xml file in your module custom_report.xml with following content
<?xml version="1.0" encoding="utf-8"?> <openerp> <data> <report auto="False" id="sale.report_sale_order" model="sale.order" name="sale.order" rml="your_module/report/sale_order.rml" string="New Quotation / Order" usage="default"/> </data> </openerp>
2) Copy your custom rml file to your_module/report/sale_order.rml
3) Create your custom parser your_module/report/sale_order.py
import time from sale.report import sale_order from openerp.report import report_sxw class order(sale_order.order): def __init__(self, cr, uid, name, context): super(order, self).__init__(cr, uid, name, context=context) from netsvc import Service del Service._services['report.sale.order'] report_sxw.report_sxw('report.sale.order', 'sale.order', 'your_module/report/sale_order.rml', parser=order, header='external')
4) create your_module/report/__init__.py
5)update your __openerp__.py file
6) Restart your server and update your module
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: 3/8/13, 10:39 AM|
|Seen: 2392 times|
|Last updated: 3/16/15, 8:10 AM|