mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-19 03:17:55 +00:00
moved directory structure
This commit is contained in:
29
patches/may_2012/cleanup_notification_control.py
Normal file
29
patches/may_2012/cleanup_notification_control.py
Normal file
@@ -0,0 +1,29 @@
|
||||
from __future__ import unicode_literals
|
||||
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()
|
||||
import webnotes.model.sync
|
||||
webnotes.model.sync.sync('setup', 'notification_control')
|
||||
Reference in New Issue
Block a user