mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
[fix] variant website page render
This commit is contained in:
@@ -144,10 +144,11 @@ class Item(WebsiteGenerator):
|
|||||||
filters={"variant_of": self.name, "show_in_website": 1}, order_by="name asc")
|
filters={"variant_of": self.name, "show_in_website": 1}, order_by="name asc")
|
||||||
|
|
||||||
variant = frappe.form_dict.variant
|
variant = frappe.form_dict.variant
|
||||||
if not variant:
|
if not variant and context.variants:
|
||||||
# the case when the item is opened for the first time from its list
|
# the case when the item is opened for the first time from its list
|
||||||
variant = context.variants[0]
|
variant = context.variants[0]
|
||||||
|
|
||||||
|
if variant:
|
||||||
context.variant = frappe.get_doc("Item", variant)
|
context.variant = frappe.get_doc("Item", variant)
|
||||||
|
|
||||||
for fieldname in ("website_image", "web_long_description", "description",
|
for fieldname in ("website_image", "web_long_description", "description",
|
||||||
|
|||||||
Reference in New Issue
Block a user