[communication] [minor

This commit is contained in:
Rushabh Mehta 2013-09-02 17:39:59 +05:30
parent 96690ebd0f
commit 8f04d119bb
4 changed files with 14 additions and 3 deletions

View File

@ -257,4 +257,5 @@ patch_list = [
"execute:webnotes.reload_doc('accounts', 'Print Format', 'POS Invoice') # 2013-08-16",
"patches.august_2013.p06_fix_sle_against_stock_entry",
"execute:webnotes.bean('Style Settings').save() #2013-08-20",
"patches.september_2013.p01_update_communication"
]

View File

View File

@ -0,0 +1,10 @@
import webnotes
def execute():
for doctype in ("Contact", "Lead", "Job Applicant", "Supplier", "Customer", "Quotation", "Sales Person", "Support Ticket"):
fieldname = doctype.replace(" ", '_').lower()
webnotes.conn.sql("""update tabCommunication
set parenttype=%s, parentfield='communications',
parent=`%s`
where ifnull(`%s`, '')!=''""" % ("%s", fieldname, fieldname), doctype)

View File

@ -2,7 +2,7 @@
{
"creation": "2013-04-10 11:45:37",
"docstatus": 0,
"modified": "2013-09-02 16:16:14",
"modified": "2013-09-02 17:25:59",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -412,10 +412,10 @@
},
{
"doctype": "DocField",
"fieldname": "communcations",
"fieldname": "communications",
"fieldtype": "Table",
"hidden": 1,
"label": "Communcations",
"label": "Communications",
"options": "Communication"
},
{