From 853d3fd1ab6e03cc1fd50429ea2d4139d1d15c77 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Wed, 23 Jan 2019 16:34:22 +0530 Subject: [PATCH] fix: Don't use .format in jinja templates - Jinja doesn't allow unicode strings to be formatted in templates --- erpnext/templates/includes/cart/cart_items.html | 5 ++--- erpnext/templates/pages/order.html | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/erpnext/templates/includes/cart/cart_items.html b/erpnext/templates/includes/cart/cart_items.html index b2e68585a7..65b81d9320 100644 --- a/erpnext/templates/includes/cart/cart_items.html +++ b/erpnext/templates/includes/cart/cart_items.html @@ -21,12 +21,11 @@ + - +
{{ d.get_formatted("amount") }} -

{{ - _("Rate: {0}").format(d.get_formatted("rate")) }}

+

{{ _("Rate") }} {{ d.get_formatted("rate") }}

{% endfor %} \ No newline at end of file diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index 74c9da0012..64fd32a992 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -73,14 +73,12 @@
{{ d.qty }} {% if d.delivered_qty is defined and d.delivered_qty != None %} -

{{ - _("Delivered: {0}").format(d.delivered_qty) }}

+

{{ _("Delivered") }} {{ d.delivered_qty }}

{% endif %}
{{ d.get_formatted("amount") }} -

{{ - _("@ {0}").format(d.get_formatted("rate")) }}

+

{{ _("Rate:") }} {{ d.get_formatted("rate") }}

{% endfor %}