Report fail after migration (5.4 to 6)

I have the report defined as follow

        <record model="" 
            <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 model="ir.action.keyword" 
            <field name="keyword">form_print</field>
            <field name="model">production,-1</field>
            <field name="action" ref="report_production_account_moves_report"/>

I revieve the following traceback:

Traceback (most recent call last):
  File "/trytond/", line 117, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/", line 47, in rpc
    return methods.get(request.rpc_method, _dispatch)(
  File "/trytond/", line 84, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/", line 159, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/", line 181, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/report/", line 196, in execute
    oext, content = cls._execute(
  File "/trytond/report/", line 210, in _execute
    return cls.convert(action, cls.render(action, report_context))
  File "/trytond/report/", line 306, in render
    data = template.generate(**report_context).render()
  File "/relatorio/templates/", line 855, in generate
    stream = super(Template, self).generate(*args, **kwargs)
  File "/genshi/template/", line 569, in generate
    stream =
  File "/genshi/template/", line 457, in stream
  File "/genshi/template/", line 476, in _prepare_self
    self._stream = list(self._prepare(self._stream, inlined))
  File "/genshi/template/", line 500, in _prepare
    yield kind, (directives, list(substream)), pos
  File "/genshi/template/", line 500, in _prepare
    yield kind, (directives, list(substream)), pos
  File "/genshi/template/", 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?


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, 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 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.