Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
8308 Представления

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
description

but it should look like

[123456] long text in my
                 description

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.

Лучший ответ

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"/>

</t>

Аватар
Отменить
Автор Лучший ответ

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

Аватар
Отменить