跳至內容
選單
此問題已被標幟
4 回覆
3773 瀏覽次數

Hello:


I am using this in order to create a item list to be printed on an rml report:


#In the python code

for item in items: if item['condition']: # This condition is defined in the code name = '<b>' + item['name'] + '</b>' else: name = item['name']

The coulde will give me a main items wich are composed with a list of items (something like the BoM).

Then in the rml i am using:

<para style="P5"> Items: [[ d["item"] ]]</para>
This will me print a report with a list of the items contained in the item, and depending if the item in the list accomplish the 'condition' this should use the format (<b> </b>).


The target should be: Items: Item1 Item2 Item3 Item4

I get instead Items: Item1 Item2 <b>Item3</b> Item4


Could someone tell me what I am doing wrong? I tried the escape codes &lt; and &gt; on the code but I get &lt;b&gt;Item3&lt;/b&gt;

Regards!
頭像
捨棄

Thanks, I will check it!

works for you?

最佳答案

You need to do it all in rml like:

<b>[[ item['name'] ]][[ item['condition'] or removeParentNode('b') ]]</b><para>[[ item['name'] ]] [[ item['condition'] and removeParentNode('para') ]]</para>
頭像
捨棄
作者 最佳答案

Not yet tested, sorry!

頭像
捨棄
Hola Alex:

Disculpa pero aún no he tenido tiempo de probarlo para marcarlo, voy a ver si le puedo dedicar un poco de tiempo la semana que viene.

Un saludo y disculpa.

2015-12-23 20:22 GMT+01:00 Axel Mendoza <portaltemplate12973@mail.odoo.com>:

solved?

--
Axel Mendoza




--
Alejandro Díaz López

Open Phoenix I.T.

Business Account Manager
Móvil (34) 652 825 009

C/Campiña, 47 Bajo
23600 Martos
Jaén (Spain)
Tel. (34)953 344 189

http://www.open-phoenix.com


 





相關帖文 回覆 瀏覽次數 活動
4
12月 23
11765
1
3月 18
4427
0
10月 16
3483
0
9月 15
4467
1
8月 15
4448