[Solved] Include item information in notifications

Hello

I have setup notification for sales order submission and i’m trying to include necessary information of all the items in the notification.
However, I’m not able to figure it out.
Can anyone help me in this regard?

Thank you.

How about define your problem - explain where you are stuck, and what you have found and tried? To add context a screenshot or traceback will help

Thanks for the reply,

I was trying to setup notification when a sales order is submitted and was unable to figure how to write Jinja tags for item information (code, delivery date, qty, rate etc.) as they get fetched from a different doc type, i.e., Sales Order Item.

That said, i eventually found a solution through trial and error. So, just pasting it here.

{% for item in doc.items %}
    <tr align="center">
        <td>{{item.item_code }}</td>
        <td>{{item.delivery_date}}</td>
        <td>{{item.qty}}</td>
        <td>{{item.rate}}</td>
        <td>{{item.amount}}</td>
    </tr>
{% endfor %}
Item Name Delivery Date Quantity Rate Amount
2 Likes

Excellent, this will help others to learn thanks