2013-08-05 09:29:54 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
2012-07-19 08:10:31 +00:00
|
|
|
from __future__ import unicode_literals
|
2012-05-03 10:56:38 +00:00
|
|
|
def execute():
|
|
|
|
import webnotes
|
|
|
|
webnotes.conn.sql("""
|
|
|
|
delete from `tabSingles`
|
|
|
|
where doctype='Notification Control'
|
|
|
|
and field in (
|
|
|
|
'payable_voucher',
|
|
|
|
'payment_received_message',
|
|
|
|
'payment_sent_message',
|
|
|
|
'enquiry')
|
|
|
|
""")
|
|
|
|
ren_list = [
|
|
|
|
['expense_voucher', 'expense_claim'],
|
|
|
|
['receivable_voucher', 'sales_invoice'],
|
|
|
|
['enquiry', 'opportunity'],
|
|
|
|
]
|
|
|
|
for r in ren_list:
|
|
|
|
webnotes.conn.sql("""
|
|
|
|
update `tabSingles`
|
|
|
|
set field=%s
|
|
|
|
where field=%s
|
|
|
|
and doctype='Notification Control'
|
|
|
|
""", (r[1], r[0]))
|
|
|
|
|
|
|
|
webnotes.conn.commit()
|
|
|
|
webnotes.conn.begin()
|
2013-05-16 09:58:19 +00:00
|
|
|
webnotes.reload_doc('setup', 'doctype', 'notification_control')
|