[fix] Shipment in portal. Fixes #4291
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index b6b7456..8ca6aca 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -64,7 +64,7 @@
{"from_route": "/shipments", "to_route": "Delivery Note"},
{"from_route": "/shipments/<path:name>", "to_route": "order",
"defaults": {
- "doctype": "Delivery Notes",
+ "doctype": "Delivery Note",
"parents": [{"title": _("Shipments"), "name": "shipments"}]
}
}
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html
index 046e6f6..45f6af0 100644
--- a/erpnext/templates/pages/order.html
+++ b/erpnext/templates/pages/order.html
@@ -46,15 +46,14 @@
</div>
<div class="col-sm-2 col-xs-3 text-right">
{{ d.qty }}
- {% if d.delivered_qty != None %}
+ {% if d.delivered_qty is defined and d.delivered_qty != None %}
<p class="text-muted small">{{
_("Delivered: {0}").format(d.delivered_qty) }}</p>
{% endif %}
</div>
<div class="col-sm-2 col-xs-3 text-right">
{{ d.get_formatted("amount") }}
- <!-- output of get_formatted("rate") is unicode, to replace unicode use
- _("text {0}").decode("utf8").format(val) -->
+ {# output of get_formatted("rate") is unicode, to replace unicode use _("text {0}").decode("utf8").format(val) #}
<p class="text-muted small">{{
_("Rate: {0}").decode("utf8").format(d.get_formatted("rate")) }}</p>
</div>