Error while printing General Journal

Bug #619864 reported by Harmel Delphine (OpenERP)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Anup(SerpentCS)

Bug Description

In Financial Management > Legal Statements > Generic Reports, print General Ledger and select all journals and periods. The following error is reported :

Environment Information :
System : Linux-2.6.32-24-generic-i686-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-24-generic
Operating System Version : #39-Ubuntu SMP Wed Jul 28 06:07:29 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : fr_BE.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 5.0.11
Last revision No. & ID :1075 <email address hidden>
Traceback (most recent call last):
  File "/home/openerp/openerp/server/bin/service/web_services.py", line 683, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/home/openerp/openerp/server/bin/report/report_sxw.py", line 364, in create
    fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
  File "/home/openerp/openerp/server/bin/report/report_sxw.py", line 426, in create_source_pdf
    return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
  File "/home/openerp/openerp/server/bin/report/report_sxw.py", line 440, in create_single_pdf
    rml_parser.set_context(objs, data, ids, report_xml.report_type)
  File "/home/openerp/openerp/server/bin/addons/account/report/general_journal.py", line 50, in set_context
    self.period_ids, self.journal_ids = zip(*res)
ValueError: need more than 0 values to unpack

Related branches

Revision history for this message
Harmel Delphine (OpenERP) (dha-openerp) wrote :
affects: openobject-client → openobject-addons
Changed in openobject-addons:
assignee: nobody → Anup (OpenERP) (ach-openerp)
status: New → Confirmed
milestone: none → 5.0.13
Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Harmel,

    I have found a solution for this. Would you please check the attached patch and notify?

Thanks.

Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :
Changed in openobject-addons:
status: In Progress → Fix Released
Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Anup,

I'm sorry but your patch is wrong, why ? because the bug was with the ids given by the user interface.

In fact, if you call the report from the wizard you will have the id from the wizard and if you use the same report from the account.journal.period object, you will have the id of this object.

So I propose this patch.

Regards,

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Anup,

I'm sorry but your patch is wrong, why ? because the bug was with the ids given by the user interface.

In fact, if you call the report from the wizard you will have the id from the wizard and if you use the same report from the account.journal.period object, you will have the id of this object.

So I propose this patch.

Regards,

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Anup,

I discussed with Jay and you can create an other bugreport about the slowness of this report.
If you have some optimization for this report, you can create an other patch for this new bug report.

Regards,

Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Stephane,

Thanks for being collaborative.

I totally agree with your point that it was due to ids, but the fix doesn't prevent the issue of the other error generated which is also generated in central journal report
https://bugs.launchpad.net/openobject-addons/+bug/619866.

And for other optimizations we have reported a bug and I'll attach a solution soon.
https://bugs.launchpad.net/openobject-addons/+bug/620429

Your inputs are always inspiring.

Thanks.

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.