mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-19 01:25:07 +00:00
Update warehouse as per master_name if master_name exists
This commit is contained in:
@@ -5,5 +5,6 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
frappe.db.sql("""update tabAccount set warehouse=master_name
|
||||
where ifnull(account_type, '') = 'Warehouse' and ifnull(master_name, '') != ''""")
|
||||
if "master_name" in frappe.db.get_table_columns("Account"):
|
||||
frappe.db.sql("""update tabAccount set warehouse=master_name
|
||||
where ifnull(account_type, '') = 'Warehouse' and ifnull(master_name, '') != ''""")
|
||||
Reference in New Issue
Block a user