Odoo Help

0

"Uncaught SyntaxError: Unexpected end of input" On creating new report

By
willie ho
on 11/13/14, 3:58 AM 1,924 views

I Created a report for the stock tracking.

my py code :

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

report_sxw.report_sxw('report.stock.tracking','stock.tracking','addons/pack_print/pack_print.rml',parser=pack_print)

my xml code:

<openerp>
    <data>
        <report header='False' auto="False" id="report_purchase_order_test" model="stock.tracking"
                name="report.stock.tracking" rml="pack_print/pack_print.rml"
                usage="default" string="Pack Unit Printing"/>
    </data>
</openerp>

I have not design my rml file yet but I have en error "Uncaught SyntaxError: Unexpected end of input" when I print the report but I can install the module with no error

What should I do to fix it?

 

0

Hi,

You have to write 

report_sxw.report_sxw('report.report.stock.tracking','stock.tracking','addons/pack_print/pack_print.rml',parser=pack_print)

because in this name of the report you have to add "report." prefix on the actual name of the report which is define into <report> tag.

So, please check with this modification.

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

Question tools

1 follower(s)

Stats

Asked: 11/13/14, 3:58 AM
Seen: 1924 times
Last updated: 3/16/15, 8:10 AM