Jinja2 template for rendering PO lines as a CSV file on fulfil.io
"Po number","Ship to Name","Ship to address","Ship to phone number","Product name","Our SKU","Your SKU","Quantity","Amount" | |
{% for record in records -%} | |
{% for line in record.lines %}"{{ [ | |
line.purchase.number, | |
line.purchase.customer and line.purchase.customer.name, | |
line.purchase.customer and line.purchase.delivery_address.full_address.replace('\r\n', ','), | |
line.purchase.customer and line.purchase.customer.phone, | |
line.supplier_product_name or line.description, | |
line.product and line.product.code, | |
line.supplier_product_code or '', | |
line.quantity, | |
line.amount | |
]|join('","') }}" | |
{% endfor %} | |
{%- endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment