Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3454 Lượt xem

Model : sale.order

Field : terms_condition --- many2many field(terms.condition)

Model : terms.condition

Field : list_name --- char field

I want to display many2many fields in my openoffice report.

But when i give the below code it not working:

[[ repeatIn(objects, 'o') ]]
[[ repeatIn(o.terms_condition,'line') ]]
[[ line.list_name ]]

 

Please help me.

 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

you can try like this.

   <para style="terp_default_Centre_9">[[ ', '.join([ tc.list_name or '' for tc in o.terms_condition ]) ]]</para>

Just put this paragraph into block table where you want to print all your terms and condition.

Ảnh đại diện
Huỷ bỏ
Tác giả

Hi, How can apply the code in sxw file. I dont know the code. I tried many ways but shows error. Can we generate report only with rml file?

Hi, Just replace your last two lines with the line : [[ ', '.join([ tc.list_name or '' for tc in o.terms_condition ]) ]] thats it.

Tác giả

I tried,but its printing the [[ ', '.join([ tc.list_name or '' for tc in o.terms_condition ]) ]] same. In my report.

Tác giả

one more thing is : In my module,it contains a report folder. In report folder - init file, py file and the rml file. But in my interface it doesnt shows the report. How can i connect the report with my database?

Tác giả

Thanks. its now working in my sxw file. Report name is not displaying in the quotation print list