Files
schuetz3-erpnext/erpnext/patches/v5_0/link_warehouse_with_account.py
2015-05-01 20:31:11 +05:30

9 lines
344 B
Python

# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
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, '') != ''""")