Search code examples
odooodoo-8odoo-9

Aeroo report line numbering


How can i do line numbering in Aeroo report. i found this solution but i'm getting error

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)> 

Solution

  • Found the solution. mapped will return list and then u can index on the list.

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