can't create xml data template for openerp 7

Bug #1246555 reported by rjay lopez
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
openobject-jasper-reports
Triaged
Undecided
Unassigned

Bug Description

When I go to jasper report > create data template > select model, gave a depth and click save as to download a xml date template.
It doesn't work for me, In other words its not downloading anything.

rjay lopez (rjay1018)
Changed in openobject-jasper-reports:
status: New → Confirmed
status: Confirmed → New
Revision history for this message
Scribder (scribder) wrote :

Hi Dear rjay,

Actually im facing the same issue here, and i cannot find how to resolve this, in the OpenERP logs there is nothing, i think i should debug the java part. i don't really know how i can debug this.

Do you have more details about this bug ??

Respectfully,
--
Youness

Revision history for this message
Scribder (scribder) wrote :

Hi Dear rjay,

Actually, i was looking to the wizard that create the file, and i have seen why the file is not poping up.

But im so pressed for now, so i will not fix the download of the file right now.

But we have some alternatives, right now i came to Raise the content of the file directly in a box, from the wizard, you can change the 'action_create_xml' function in "/jasper_reports/wizard/jasper_create_data_template.py" like this to raise the content:

""""
    def action_create_xml(self, cr, uid, ids, context=None):
        for data in self.read(cr, uid, ids, context=context):
            model = self.pool.get('ir.model').browse(cr, uid, data['model'][0], context=context)
            xml = self.pool.get('ir.actions.report.xml').create_xml(cr, uid, model.model, data['depth'], context)
            self.write(cr,uid,ids,{
                'data' : base64.encodestring( xml ),
                'filename': 'template.xml'
            })
            raise osv.except_osv((''),("%s") % (base64.encodestring( xml )))

        return True
""""

Or maybe you can open a file inside the server, and save the content of the XML file.

i hope this may help, i will come back when have time to fix this, i think i can do that.

Regards dear,

Revision history for this message
rjay lopez (rjay1018) wrote :

Hello Scribder,

Thank you for your response. I try the first option about changing the 'action_create_xml' function in "/jasper_reports/wizard/jasper_create_data_template.py". But I get this error from my logs
====================================================================================================
Traceback (most recent call last):
  File "/opt/openerp/server-7/openerp/netsvc.py", line 293, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server-7/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server-7/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server-7/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server-7/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server-7/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server-7/openerp/addons/jasper_reports/wizard/jasper_create_data_template.py", line 58, in action_create_xml
    raise osv.except_osv((''),("%s") % (base64.encodestring( xml )))
except_osv: ('', 'PGRhdGE+PHJlY29yZD48aWQ+MTwvaWQ+PEFjdGl2ZS1hY3RpdmU+YWN0aXZlPC9BY3RpdmUtYWN0\naXZlPjxBY3R1YWxfQ29zdC1hY3R1YWxfY29zdD4xMjM0NS42NzwvQWN0dWFsX0Nvc3QtYWN0dWFs\nX2Nvc3Q+PEFjdHVhbF9Qcm9maXQtYWN0dWFsX3Byb2ZpdD4xMjM0NS42NzwvQWN0dWFsX1Byb2Zp\ndC1hY3R1YWxfcHJvZml0PjxQbGFubmVkX1Rhc2tfTGluZS1hY3R1YWxfdG
....................
====================================================================================================
actually the scrambled letters and number is too long so I just represent it with several dot :)

I'm looking forward to try your second option. I might just need your help for more specific steps or details how to get in to the server, and save the content of the xml file.

Thank you and more power,

Revision history for this message
Scribder (scribder) wrote :

Hi Dear rjay,

Yes exact, actually sorry i didn't tell you that you are not forced to encode the file, just popup the "XML" var instead of poping up the encoded one...and do the same by saving the xml content in a file somewhere.

And i will return after this weekend and see how to fix that properly.

i hope you are not blocked for now,

Good luck dear,

Revision history for this message
rjay lopez (rjay1018) wrote :

Hi Scribder,

Actually im getting a hard time using other software for my report right now. I'm hoping you can help us to fixed it. We love using jasper report as our report module in openerp.

Thank you and more power,

Revision history for this message
Scribder (scribder) wrote :

Hi Rjay,

Sure dear, you are welcome.

Regards,

Revision history for this message
Scribder (scribder) wrote :

Hi Rjay,

I Worked to fix this properly, and it wws only an issue of changing the behavior of returning the field....i will put this in this bug..and you can apply it.

BTW, i sent you an email, i think you didn't read it.

Regards,

Revision history for this message
rjay lopez (rjay1018) wrote : Re: [Bug 1246555] Re: can't create xml data template for openerp 7

Hi Scribder,

Happy New Year. I had a busy schedule lately. I check yeah your right I
haven't check your email. Thank you I'll just keep in touch

On Thu, Jan 2, 2014 at 7:20 PM, Scribder <email address hidden> wrote:

> Hi Rjay,
>
> I Worked to fix this properly, and it wws only an issue of changing the
> behavior of returning the field....i will put this in this bug..and you
> can apply it.
>
> BTW, i sent you an email, i think you didn't read it.
>
> Regards,
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1246555
>
> Title:
> can't create xml data template for openerp 7
>
> Status in Jasper Reports for OpenERP:
> New
>
> Bug description:
> When I go to jasper report > create data template > select model, gave a
> depth and click save as to download a xml date template.
> It doesn't work for me, In other words its not downloading anything.
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/openobject-jasper-reports/+bug/1246555/+subscriptions
>

Revision history for this message
rjay lopez (rjay1018) wrote :

Hi Scribder,

Do you have any updates for this bug?

Rjay

Omar (Pexego) (omar7r)
Changed in openobject-jasper-reports:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.