Odoo Help

Welcome!

This community 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.

0

error printing report <traceback object at 0x06F19DC8>)?

By
kais dkhili
on 5/30/14, 8:33 AM 1,468 views

I want to print a report. I have a module named partnership is under the addons folder. and under the partnership folder I carry the folder that contains new_report.rml new_report.sxw and new_report.py class containing this code:

import time
from openerp.report import report_sxw

class new_report(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(new_report, self).__init__(cr, uid, name, context=context)
self.localcontext.update( {'time': time,})

report_sxw.report_sxw('report.commercial_report', 'contratcommercial',
'partnership/report/new_report.rml',
parser=new_report, header="internal")

under addons / partnership partnership I report.xml containing this code:

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<report
auto="False"
id="new_report_id"
model="contratcommercial"
name="commercial_report"
rml="partnership/report/new_report.rml"
string="imprimer contrat "/>

</data>
</openerp>

but I still have this error 

report.commercial_report

(<type 'exceptions.KeyError'>, KeyError(u'report.commercial_report',), <traceback object at 0x06F19DC8>)

I even tried to put an empty file to know if the error is because of rml file but no result and always the some error

please any help

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/30/14, 8:33 AM
Seen: 1468 times
Last updated: 3/16/15, 8:10 AM