Nabin Hait be8ec39678 Deleted master_type, master_name, credit_days, credit_limit fields from account
Warehouse account is linked via Warehouse field now, instead of master_name field
patch to copy warehouse value from master_name to warehouse
party_type and party field added in GL Entry and Journal Voucher Detail
2014-10-06 13:02:40 +05:30

11 lines
401 B
Python

# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("accounts", "doctype", "account")
frappe.db.sql("""update tabAccount set warehouse=master_name
where ifnull(account_type, '') = 'Warehouse' and ifnull(master_name, '') != ''""")