How to use for loop and if conditions in ods format

I have developed a report, and I attached the fodt format, and it’s working fine, but I also need the ODS format to attach as well because I need both PDF and Excel data. In some reports, I already attached both formats, but in this report, I face an issue while using IF conditions, so please guide me, anyone, regarding this…
The below are the font placeholders, and it work fine, so how would these placeholders be for ODS?

Stock Issuance Detailed Report

Issued  Store:  <from_location>
 From Date:        
<date_from>
 To:
<date_to>

<if test="report_summary">
S.No
Shipment No
Item
Expiry Date
 Batch
Stock Qty
Purchase Price
Amount
Planned Date
State
</if>
<for each="location in grouped_locations">
<location.to_location_name>
<if test="not report_summary">
S.No
Shipment No
Item
Expiry Date
 Batch
Stock Qty
Purchase Price
Amount
Planned Date
State
<for each="line in location.lines">
<line.s_no>
<line.shipment_no>
<line.product>
<line.expiration_date>
<line.lot>
<format_number(line.quantity, user.language, digits=2)>
<format_number(line.purchase_price, user.language, digits=2)>
<format_number(line.amount, user.language, digits=2)>
<line.planned_date>
<line.state>
</for>
</if>
Total:
<format_number(location.total_qty, user.language, digits=2)>
<format_number(location.total_purchase_price, user.language, digits=2)>
<format_number(location.total_amount, user.language, digits=2)>

</for>

Grand Total:
<format_number(grand_total_qty, user.language, digits=2)>
<format_number(grand_total_purchase_price, user.language, digits=2)>
<format_number(grand_total_amount, user.language, digits=2)>

The syntax is the same for ODS but you need to use hyperlink instead of placeholder (because they are not available on spreadsheet).

Hi.

See: modules/sale/sale.fodt · branch/default · Tryton / Tryton · GitLab

In this report you can see some example and poweful use cases. Please get this document and open it with your favorite text editor (see: Libreoffice)

greetings.

Thank you for your kind reply. Yes, I used a hyperlink. But the issue was found; I had used an extra slash (/) in the if condition. so it is fixed now

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.