[fix] [patch] item template attributes
This commit is contained in:
parent
2235caebee
commit
2f01f96ae3
@ -45,8 +45,9 @@ def rename_and_reload_doctypes():
|
|||||||
|
|
||||||
def migrate_manage_variants():
|
def migrate_manage_variants():
|
||||||
item_attribute = {}
|
item_attribute = {}
|
||||||
for d in frappe.db.sql("""select DISTINCT va.attribute, i.variant_of from `tabItem Variant Attribute` va, `tabItem` i \
|
for d in frappe.db.sql("""select DISTINCT va.attribute, i.variant_of
|
||||||
where va.parent = i.name""", as_dict=1):
|
from `tabItem Variant Attribute` va, `tabItem` i
|
||||||
|
where va.parent = i.name and ifnull(i.variant_of, '')!=''""", as_dict=1):
|
||||||
item_attribute.setdefault(d.variant_of, []).append({"attribute": d.attribute})
|
item_attribute.setdefault(d.variant_of, []).append({"attribute": d.attribute})
|
||||||
|
|
||||||
for item, attributes in item_attribute.items():
|
for item, attributes in item_attribute.items():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user