Odoo Help


How can I add an increasing line number in the first column of my invoice.line

Gunther Kohn
on 8/6/14, 9:56 AM 2,437 views

How can I print a line number in each invoice line like this on my invoice (pdf):

PosNo. | Article No | Description | Tax   | Amount ...

1          | 123456    | Article 1      | 19% |  10 ...
2          | 212345    | Article 2      | 19% |    5 ...

How can I seperate the article number from the description?

I only found "[[ l.name ]]" in my invoice so the output is "[123456] Article 1". If I have a long Description text it looks like

[123456] long text in my

but it should look like

[123456] long text in my

I work with openERP report designer and openOffice (openERP 7.0)
Thanks in advance.




The second point I resolved: First, I create a new column for article no.: [[ (l.product_id and l.product_id.code) or '' ]] Then I change the entry for description: [[ (l.product_id and l.product_id.name_template) or l.name ]] So, if you choose an existing article, you can not change the description. But if you enter a discription only, this will be used.

Gunther Kohn
on 8/7/14, 5:41 AM


| 6 5 7
Lodz, Poland

On 12/3/14, 11:34 AM

You add in rml report <seq> tag, like this:   <seq id="seq_1"/>

and reset after loop: <para><seqReset id="seq_1"/></para>

if you use v8, add "_index", like this:

<t t-foreach="lines(o)" t-as="l">

<span t-esc="l_index+1"/>


Gunther Kohn
On 9/29/14, 8:01 AM

Thank you for this hint. That is what I need. Is it possible to insert this <seq /> via the Report Designer?

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 8/6/14, 9:56 AM
Seen: 2437 times
Last updated: 3/16/15, 8:10 AM