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

View File

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