brotherton-erpnext/erpnext/patches/v7_2/update_website_for_variant.py

13 lines
303 B
Python
Raw Normal View History

from __future__ import unicode_literals
import frappe
def execute():
# variant must have show_in_website = 0
frappe.reload_doctype('Item')
frappe.db.sql('''
update tabItem set
show_variant_in_website = 1,
show_in_website = 0
where
show_in_website=1
and ifnull(variant_of, "")!=""''')