This question has been flagged
1 Reply
3103 Views

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.

 

Avatar
Discard
Best Answer

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.

Avatar
Discard
Author

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.

Author

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

Author

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?

Author

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