diff --git a/erpnext/patches/v6_4/make_image_thumbnail.py b/erpnext/patches/v6_4/make_image_thumbnail.py index 36bdcfc6d45..702148a8f67 100644 --- a/erpnext/patches/v6_4/make_image_thumbnail.py +++ b/erpnext/patches/v6_4/make_image_thumbnail.py @@ -3,8 +3,8 @@ import frappe def execute(): frappe.reload_doctype("File") frappe.reload_doctype("Item") - for item in frappe.get_all("Item", fields=("name", "website_image")): - if item.website_image: + for item in frappe.get_all("Item", fields=("name", "website_image", "thumbnail")): + if item.website_image and not item.thumbnail: item_doc = frappe.get_doc("Item", item.name) try: item_doc.make_thumbnail() diff --git a/erpnext/templates/generators/item.html b/erpnext/templates/generators/item.html index ccb992b804e..4bd521d5a7d 100644 --- a/erpnext/templates/generators/item.html +++ b/erpnext/templates/generators/item.html @@ -26,29 +26,31 @@

{{ _("Item Code") }}: {{ name }}


+
+ {% if has_variants %} + {% for d in attributes %} +
+
{{ _(d.attribute) }}
+ +
+ {% endfor %} + {% endif %} +
+

- {% if has_variants %} - {% for d in attributes %} -
-
{{ _(d.attribute) }}
- -
- {% endfor %} - {% endif %} -