Report fail after migration (5.4 to 6)

I have the report defined as follow

        <record model="ir.action.report" 
          id="report_production_account_moves_report">
            <field name="name">Account Moves Report</field>
            <field name="model">production</field>
            <field name="report_name">production</field>
            <field name="report">xxxxxx/account_moves_report.fods</field>
            <field name="template_extension">ods</field>
            <field name="extension">xlsx</field>
        </record>
        <record model="ir.action.keyword" 
          id="report_production_account_moves_report_keyword">
            <field name="keyword">form_print</field>
            <field name="model">production,-1</field>
            <field name="action" ref="report_production_account_moves_report"/>
        </record>

I revieve the following traceback:

Traceback (most recent call last):
  File "/trytond/wsgi.py", line 117, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 47, in rpc
    return methods.get(request.rpc_method, _dispatch)(
  File "/trytond/wsgi.py", line 84, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/wrappers.py", line 159, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 181, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/report/report.py", line 196, in execute
    oext, content = cls._execute(
  File "/trytond/report/report.py", line 210, in _execute
    return cls.convert(action, cls.render(action, report_context))
  File "/trytond/report/report.py", line 306, in render
    data = template.generate(**report_context).render()
  File "/relatorio/templates/opendocument.py", line 855, in generate
    stream = super(Template, self).generate(*args, **kwargs)
  File "/genshi/template/base.py", line 569, in generate
    stream = self.stream
  File "/genshi/template/base.py", line 457, in stream
    self._prepare_self()
  File "/genshi/template/base.py", line 476, in _prepare_self
    self._stream = list(self._prepare(self._stream, inlined))
  File "/genshi/template/base.py", line 500, in _prepare
    yield kind, (directives, list(substream)), pos
  File "/genshi/template/base.py", line 500, in _prepare
    yield kind, (directives, list(substream)), pos
  File "/genshi/template/base.py", line 493, in _prepare
    for _, cls, value, namespaces, pos in sorted(data[0]):
TypeError: '<' not supported between instances of 'dict' and 'dict'

Fault: '<' not supported between instances of 'dict' and 'dict'

I don’t understand where it can be the problem for such error. Any ideas?

Hello,

I think you got those problems, which occur in loops nested in table cells :

I bypassed this by patching trytond and ignoring _callback_loader in report.py, however this is only possible because I do not care for translations, and because I use a custom trytond build anyway.

Indeed there are still a problem with Genshi. I posed Translator filter merge sub-directives · Issue #48 · edgewall/genshi · GitHub which contains a failing test case.

Thanks for pointing me that.
In my case the report it’s not to much drama to not beeing translated for now. As @JCavallo points bypassing _callback_loader it’s a solution.
I solved adding <field name="translatable" eval="False"/> to my xml ir.action.report entry instead of patching _callback_loader.

I submitted a pull request which should fix the problem: Do not merge sub directives if they have not been changed by cedk · Pull Request #53 · edgewall/genshi · GitHub

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.