Aeroo 报告行编号

Aeroo report line numbering

如何在 Aeroo 报告中进行行编号。我找到了这个解决方案,但出现错误

Aeroo Reports: Error while generating the report.
sale.order.line(23,) has no member named "index"
sale.order.line(23,) has no member named "index"
For more reference inspect error logs.: (<type 'exceptions.Exception'>, Exception('Aeroo Reports: Error while generating the report.', UndefinedError('sale.order.line(23,) has no member named "index"',),

for each="line in o.order_line"

<str(o.order_line.index(line)+1)> 

找到解决方案。映射将 return 列出,然后你可以在列表上建立索引。

str(o.order_line.mapped('id').index(line.id)+1)