How can I display the line number without add another reporting module?
Hi.
My question is as follows: How display the line number, in sale order report for example, without create another module.
...
<section>
[[repeatIn(
<blockTable colWidths="1cm..." style="table">
<tr>
<td><para style="my_style">[[ CODE ]]</para></td>
...
I've "solved" this issue in two steps:
1. Adding a line in the file: report/
self.localcontext = {
...
'enumerate': enumerate,
...
2. Changing the previous piece of code:
...
<section>
[[repeatIn(
<blockTable colWidths="1cm..." style="table">
<tr>
<td><para style="my_style">[[ line[0] + 1 ]]</para></td>
...
And now my true line is line[1] and I can use it later.
Friends, is this the right solution? I think that OpenERP should provide a manner of import the module __builtins__ inside a RML file, without create another modules, or, provide by default the built-in functions in the RML reports. Easyly I can create a module a send the line numbers by self.localconte
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Serpent Consulting Services
- Solved:
- Last query:
- Last reply: