fix: Wrong variable name breaks Cart Items rendering

This commit is contained in:
marination 2022-01-21 15:58:29 +05:30
parent 143ff715e7
commit 00752ca01d
2 changed files with 4 additions and 1 deletions

View File

@ -288,7 +288,7 @@ def decorate_quotation_doc(doc):
)[0]
item_code = variant_data.variant_of
fields = fields[1:]
d.website_item_name = variant_data.item_name
d.web_item_name = variant_data.item_name
if variant_data.image: # get image from variant or template web item
d.thumbnail = variant_data.image

View File

@ -169,6 +169,9 @@ class TestShoppingCart(unittest.TestCase):
self.assertEqual(doc.get("items")[0].item_name, "Test-Tshirt-Temp-S-R")
# test if items are rendered without error
frappe.render_template("templates/includes/cart/cart_items.html", cart)
def create_tax_rule(self):
tax_rule = frappe.get_test_records("Tax Rule")[0]
try: