[patch] map customer_address to shipping_address and customer_address_display to shipping_address_display
This commit is contained in:
parent
14d646f636
commit
0f063a5f46
@ -256,3 +256,4 @@ erpnext.patches.v6_24.set_recurring_id
|
||||
erpnext.patches.v6_20x.set_compact_print
|
||||
execute:frappe.delete_doc_if_exists("Web Form", "contact") #2016-03-10
|
||||
erpnext.patches.v6_20x.remove_fiscal_year_from_holiday_list
|
||||
erpnext.patches.v6_24.map_customer_address_to_shipping_address_on_po
|
@ -0,0 +1,19 @@
|
||||
# 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_doctype("Purchase Order")
|
||||
|
||||
if not frappe.db.has_column("Purchase Order", "shipping_address"):
|
||||
return
|
||||
|
||||
if not frappe.db.has_column("Purchase Order", "customer_address"):
|
||||
return
|
||||
|
||||
frappe.db.sql("""update `tabPurchase Order` set shipping_address=customer_address,
|
||||
shipping_address_display=customer_address_display""")
|
||||
|
||||
frappe.db.commit()
|
Loading…
Reference in New Issue
Block a user