for loop doen't work

Bug #950132 reported by Steeve Chailloux
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Aeroo Reporting library
Undecided
Unassigned

Bug Description

I'm trying to make for loop with aeroo, like in the documentation but it give me an error:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 710, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/report_aeroo/report_aeroo.py", line 681, in create
    return fnct(cr, uid, ids, data, report_xml, context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/report_aeroo/report_aeroo.py", line 627, in create_source_odt
    return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/report_aeroo/report_aeroo.py", line 474, in create_single_pdf
    return self.create_aeroo_report(cr, uid, ids, data, report_xml, context=context, output=output)
  File "/usr/lib/pymodules/python2.7/openerp/addons/report_aeroo/report_aeroo.py", line 388, in create_aeroo_report
    basic = Template(source=template_io, serializer=serializer)
  File "/usr/local/lib/python2.7/dist-packages/aeroolib-1.0.0.RC4-py2.7.egg/aeroolib/plugins/opendocument.py", line 234, in __init__
    encoding, lookup, allow_exec)
  File "/usr/local/lib/python2.7/dist-packages/Genshi-0.6-py2.7.egg/genshi/template/markup.py", line 67, in __init__
    allow_exec=allow_exec)
  File "/usr/local/lib/python2.7/dist-packages/Genshi-0.6-py2.7.egg/genshi/template/base.py", line 406, in __init__
    self._stream = self._parse(source, encoding)
  File "/usr/local/lib/python2.7/dist-packages/aeroolib-1.0.0.RC4-py2.7.egg/aeroolib/plugins/opendocument.py", line 247, in _parse
    content = template._parse(self.insert_directives(content), encoding)
  File "/usr/local/lib/python2.7/dist-packages/aeroolib-1.0.0.RC4-py2.7.egg/aeroolib/plugins/opendocument.py", line 298, in insert_directives
    self._handle_aeroo_tags(tree)
  File "/usr/local/lib/python2.7/dist-packages/aeroolib-1.0.0.RC4-py2.7.egg/aeroolib/plugins/opendocument.py", line 390, in _handle_aeroo_tags
    r_statements, closing_tags = self._aeroo_statements(tree)
  File "/usr/local/lib/python2.7/dist-packages/aeroolib-1.0.0.RC4-py2.7.egg/aeroolib/plugins/opendocument.py", line 371, in _aeroo_statements
    assert not opened_tags

I use aeroolib with the last commit:
----------------------------------------------------------------
revno: 4
committer: root <email address hidden>
branch nick: aeroolib
timestamp: Mon 2011-11-21 19:20:57 +0200
message:
  This is bugfix (RC4) release
----------------------------------------------------------------
in openerp 6.1

I give you a test file in attachement

thanks

Revision history for this message
Steeve Chailloux (steeve-f) wrote :
Revision history for this message
Chandrapal Zala(SerpentCS) (c-zala-serpentcs) wrote :

Hi Steeve,

This problem occurs only when you dont end 'for loop'.

Starting of loop is there but end of loop is not defined or may be syntax wrong or may write at footer or not executable part.

Please Recheck your end of for(</for>).

Thanks,
Chandrapal(serpentcs).

Revision history for this message
sraps (Alistek) (erpsraps) wrote :

The file contains two <for each="..."> fields in a row. This is evidently happened by mistake. One field is very narrow, so please pay attention.

Changed in aeroolib:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers