2015-02-24 12:24:53 +05:30
|
|
|
from __future__ import unicode_literals
|
2014-02-28 11:37:36 +05:30
|
|
|
import frappe
|
|
|
|
|
|
|
|
def execute():
|
|
|
|
frappe.reload_doc("website", "doctype", "contact_us_settings")
|
|
|
|
address = frappe.db.get_value("Contact Us Settings", None, "address")
|
|
|
|
if address:
|
2014-03-28 16:44:37 +05:30
|
|
|
address = frappe.get_doc("Address", address)
|
|
|
|
contact = frappe.get_doc("Contact Us Settings", "Contact Us Settings")
|
2014-02-28 11:37:36 +05:30
|
|
|
for f in ("address_title", "address_line1", "address_line2", "city", "state", "country", "pincode"):
|
2014-03-28 13:55:00 +05:30
|
|
|
contact.set(f, address.get(f))
|
2014-02-28 11:37:36 +05:30
|
|
|
|
|
|
|
contact.save()
|