link warehouse with account

This commit is contained in:
Nabin Hait 2015-05-01 20:31:11 +05:30
parent f25822cd8d
commit d51b09282a
3 changed files with 11 additions and 6 deletions

View File

@ -147,3 +147,4 @@ erpnext.patches.v4_2.delete_gl_entries_for_cancelled_invoices
erpnext.patches.v5_0.project_costing
erpnext.patches.v5_0.update_temporary_account
erpnext.patches.v5_0.update_advance_paid
erpnext.patches.v5_0.link_warehouse_with_account

View File

@ -15,11 +15,6 @@ def execute():
delete_individual_party_account()
remove_customer_supplier_account_report()
def link_warehouse_account():
frappe.db.sql("""update tabAccount set warehouse=master_name
where ifnull(account_type, '') = 'Warehouse' and ifnull(master_name, '') != ''""")
def create_receivable_payable_account():
receivable_payable_accounts = frappe._dict()

View File

@ -0,0 +1,9 @@
# 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, '') != ''""")