for each="shipment in records"
replace text:p="set_lang(shipment.delivery_address.party.lang)"
replace text:p="shipment.set_lang(shipment.delivery_address.party.lang)"
shipment.customer.full_name
for each="line in shipment.delivery_address.full_address.split('\n')"
line
/for
choose
when test="shipment.state in ['packed', 'done']"
Delivery Note N°: shipment.number
/when
when test="shipment.state == 'cancelled'"
Cancelled Delivery Note
/when
otherwise
Draft Delivery Note
/otherwise
/choose
if test="shipment.customer.code"
Customer Code: shipment.customer.code
/if
Reference: shipment.origins or ''', ' if (shipment.origins and shipment.reference) else ''shipment.reference or ''
if test="shipment.warehouse.address and shipment.warehouse.address.country"
Location: shipment.warehouse.address.country.name
/if
Date: format_date(shipment.effective_date or datetime.date.today(), shipment.delivery_address.party.lang)
Product	Quantity
for each="move in moves(shipment)"
move.product_name	format_number_symbol(move.quantity, shipment.delivery_address.party.lang, move.unit, digits=move.unit.digits)
/for
/for
if test="company and company.header"
for each="line in company.header_used.split('\n')"
line
/for
/if
company.rec_name if company else ''
if test="company and company.footer"
for each="line in company.footer_used.split('\n')"
3/3