account_report "Print Indicators" bug

Bug #574326 reported by David Janssens
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Low
Jay Vora (Serpent Consulting Services)

Bug Description

I use account_report to define balance sheets and income statement reports.
To print the reports for previous periods, I click on "Print Indicators", which asks for fiscal year and periods.
But the pdf is not generated due to some errors. Looking at the rml file, there will always be errors when printing this report.

Changed in openobject-addons:
status: New → Confirmed
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hi,

Can you please test this quick patch.

Thanks

Changed in openobject-addons:
assignee: nobody → nch(OpenERP) (nch-openerp)
status: Confirmed → In Progress
Revision history for this message
David Janssens (david.j-almacom) wrote : Re: [Bug 574326] Re: account_report "Print Indicators" bug

Unfortunately it doesn't work for me.
I get errors such as:

[2010-05-03 21:21:52,192] ERROR:report:[22]: KeyError: 'Jan'
[2010-05-03 21:21:52,192] ERROR:report:[23]:
[2010-05-03 21:21:52,192] ERROR:report:[24]: 'Jan'
[2010-05-03 21:21:52,192] ERROR:report:[25]: expr: array['Jan'] or ''

Apparently in the RML file, the name prefix of periods are hardcoded and
the server raises exceptions when trying to find it in a dictionary.

I would like to know what is the recommended way to print a balance
sheet or income statement for a given accounting period?

Thanks,
--
David Janssens
Almacom (Thailand) Ltd.
http://almacom.co.th/

On 05/03/2010 08:15 PM, nch(OpenERP) wrote:
> Hi,
>
> Can you please test this quick patch.
>
> Thanks
>
> ** Changed in: openobject-addons
> Assignee: (unassigned) => nch(OpenERP) (nch-openerp)
>
> ** Changed in: openobject-addons
> Status: Confirmed => In Progress
>
> ** Patch added: "indicator.diff"
> http://launchpadlibrarian.net/47548491/indicator.diff
>
>

Revision history for this message
forstera (arnaud-forster-deactivatedaccount) wrote :

Hello,
I just tried to print a report and here's the error I get (i did not applied the patch) :

[2010-05-20 09:45:18,457] INFO:report:request report 'account.vat.declaration'
[2010-05-20 09:46:12,445] INFO:report:request report 'account.aged_trial_balance'
[2010-05-20 09:47:03,482] INFO:report:request report 'print.indicators'
Unhandled exception in thread started by <function print_thread at 0xb17b614>
Traceback (most recent call last):
  File "/usr/lib/openerp-server/addons/printjob/printjob.py", line 392, in print_thread
    (result, format) = service.create(cr, uid, ids, datas, context)
  File "/usr/lib/openerp-server/report/report_sxw.py", line 364, in create
    fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
  File "/usr/lib/openerp-server/report/report_sxw.py", line 426, in create_source_pdf
    return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
  File "/usr/lib/openerp-server/report/report_sxw.py", line 447, in create_single_pdf
    pdf = create_doc(etree.tostring(processed_rml),rml_parser.localcontext,logo,title.encode('utf8'))
  File "/usr/lib/openerp-server/report/interface.py", line 183, in create_pdf
    obj.render()
  File "/usr/lib/openerp-server/report/render/render.py", line 50, in render
    result = self._render()
  File "/usr/lib/openerp-server/report/render/rml.py", line 41, in _render
    return rml2pdf.parseNode(self.rml, self.localcontext, images=self.bin_datas, path=self.path,title=self.title)
  File "/usr/lib/openerp-server/report/render/rml2pdf/trml2pdf.py", line 790, in parseNode
    r.render(fp)
  File "/usr/lib/openerp-server/report/render/rml2pdf/trml2pdf.py", line 204, in render
    pt_obj.render(el)
  File "/usr/lib/openerp-server/report/render/rml2pdf/trml2pdf.py", line 780, in render
    fis += r.render(node_story)
  File "/usr/lib/openerp-server/report/render/rml2pdf/trml2pdf.py", line 709, in render
    return process_story(node_story)
  File "/usr/lib/openerp-server/report/render/rml2pdf/trml2pdf.py", line 698, in process_story
    for node in utils._child_get(node_story, self):
  File "/usr/lib/openerp-server/report/render/rml2pdf/utils.py", line 62, in _child_get
    for ctx in eval(n.get('rml_loop'),{}, self.localcontext):
  File "<string>", line 1, in <module>
NameError: name 'o' is not defined

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nch(OpenERP) (nch-openerp) → Jay (OpenERP) (jvo-openerp)
importance: Undecided → Low
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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