2019-04-05 06:40:36 +00:00
|
|
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
2021-09-02 11:14:59 +00:00
|
|
|
|
2019-04-05 06:40:36 +00:00
|
|
|
import frappe
|
|
|
|
|
2021-09-02 11:14:59 +00:00
|
|
|
|
2019-04-05 06:40:36 +00:00
|
|
|
def execute():
|
|
|
|
frappe.db.sql("""update tabItem set variant_based_on = 'Item Attribute'
|
|
|
|
where ifnull(variant_based_on, '') = ''
|
|
|
|
and (has_variants=1 or ifnull(variant_of, '') != '')
|
|
|
|
""")
|