[fix] [patch] item template attributes

This commit is contained in:
Anand Doshi 2015-09-10 18:10:15 +05:30
parent a1b0ff09a8
commit 793b87948c

View File

@ -72,8 +72,6 @@ def migrate_item_variants():
for attribute, value in item_attributes: for attribute, value in item_attributes:
attribute_value_options.setdefault(attribute, []).append(value) attribute_value_options.setdefault(attribute, []).append(value)
save_attributes_in_template(item, attribute_value_options)
possible_combinations = get_possible_combinations(attribute_value_options) possible_combinations = get_possible_combinations(attribute_value_options)
for variant in all_variants: for variant in all_variants:
@ -89,6 +87,8 @@ def migrate_item_variants():
save_attributes_in_variant(variant, combination) save_attributes_in_variant(variant, combination)
break break
save_attributes_in_template(item, attribute_value_options)
frappe.delete_doc("DocType", "Item Variant") frappe.delete_doc("DocType", "Item Variant")
def save_attributes_in_template(item, attribute_value_options): def save_attributes_in_template(item, attribute_value_options):