added patch for address
This commit is contained in:
parent
fb21ce3893
commit
063141d152
@ -21,3 +21,4 @@ execute:frappe.reload_doc('hr', 'doctype', 'employee') # 2014-02-03
|
||||
execute:frappe.db.sql("update tabPage set module='Core' where name='Setup'")
|
||||
erpnext.patches.4_0.fields_to_be_renamed
|
||||
erpnext.patches.4_0.rename_sitemap_to_route
|
||||
erpnext.patches.4_0.fix_contact_address
|
||||
|
12
erpnext/patches/4_0/fix_contact_address.py
Normal file
12
erpnext/patches/4_0/fix_contact_address.py
Normal file
@ -0,0 +1,12 @@
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc("website", "doctype", "contact_us_settings")
|
||||
address = frappe.db.get_value("Contact Us Settings", None, "address")
|
||||
if address:
|
||||
address = frappe.doc("Address", address)
|
||||
contact = frappe.bean("Contact Us Settings", "Contact Us Settings")
|
||||
for f in ("address_title", "address_line1", "address_line2", "city", "state", "country", "pincode"):
|
||||
contact.doc.fields[f] = address.get(f)
|
||||
|
||||
contact.save()
|
Loading…
x
Reference in New Issue
Block a user