From 793b87948c3c0a3739a46689fa2bcdf6dbc53f07 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 10 Sep 2015 18:10:15 +0530 Subject: [PATCH] [fix] [patch] item template attributes --- erpnext/patches/v5_7/item_template_attributes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v5_7/item_template_attributes.py b/erpnext/patches/v5_7/item_template_attributes.py index 9536f1628c..9f141b5b08 100644 --- a/erpnext/patches/v5_7/item_template_attributes.py +++ b/erpnext/patches/v5_7/item_template_attributes.py @@ -72,8 +72,6 @@ def migrate_item_variants(): for attribute, value in item_attributes: attribute_value_options.setdefault(attribute, []).append(value) - save_attributes_in_template(item, attribute_value_options) - possible_combinations = get_possible_combinations(attribute_value_options) for variant in all_variants: @@ -89,6 +87,8 @@ def migrate_item_variants(): save_attributes_in_variant(variant, combination) break + save_attributes_in_template(item, attribute_value_options) + frappe.delete_doc("DocType", "Item Variant") def save_attributes_in_template(item, attribute_value_options):