How can I terminate loop, When I got my condition(Quotation number ) in sales order items child table

SO PRINT FORMAT

Hello all, I’ve created Sales Order against Quotation now I want to show Quotation number only one time on my Sales Order Custom Print format, So please give me suggestions to how can I terminate loop when I got my condition (Quotation Number).

For more details please find the attached both images now here Quotation number is multiple time printed on print format,which means my loop is not closed after my condition executed.

Thanks & Regards,
Parmeshwar Kadam
-9764131517
-Parmeshwark@gmail.com

Hello,
I saw your issue that you’re facing. For terminate loop you can simply use flag if condition is true then it’ll break that loop.

names = ["SO0001", "SO0002", "SO0003"]
for i in names:
    if i == "SO0002":
        break
1 Like