Merge pull request #14247 from rohitwaghchaure/patch_fixed_for_asset_warehouse

Fixed patch, checked warehouse available in the asset
This commit is contained in:
rohitwaghchaure 2018-05-28 12:30:55 +05:30 committed by GitHub
commit 30c88fe1a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,7 @@ def execute():
frappe.reload_doc('assets', 'doctype', 'asset_movement')
frappe.reload_doc('assets', 'doctype', 'asset_category_account')
if frappe.db.has_column("Asset", "warehouse"):
frappe.db.sql(""" update `tabAsset` ast, `tabWarehouse` wh
set ast.location = wh.warehouse_name where ast.warehouse = wh.name""")