fixes in notification control due to renaming of doctype
This commit is contained in:
parent
47fac1804b
commit
4b6c1f8de5
28
erpnext/patches/may_2012/cleanup_notification_control.py
Normal file
28
erpnext/patches/may_2012/cleanup_notification_control.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
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')
|
@ -322,5 +322,10 @@ patch_list = [
|
|||||||
'patch_file': 'rename_prev_doctype',
|
'patch_file': 'rename_prev_doctype',
|
||||||
'description': 'rename prev doctype fix'
|
'description': 'rename prev doctype fix'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'patch_module': 'patches.may_2012',
|
||||||
|
'patch_file': 'cleanup_notification_control',
|
||||||
|
'description': 'cleanup notification control'
|
||||||
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
|
@ -37,7 +37,8 @@ cur_frm.cscript.notify = function(doc, args) {
|
|||||||
if(user!='Administrator') {
|
if(user!='Administrator') {
|
||||||
return user;
|
return user;
|
||||||
} else {
|
} else {
|
||||||
return (wn.control_panel.auto_email_id || 'automail@erpnext.com');
|
return (wn.control_panel.auto_email_id ||
|
||||||
|
'ERPNext Notification<automail@erpnext.com>');
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
if(res.send) {
|
if(res.send) {
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
# These values are common in all dictionaries
|
# These values are common in all dictionaries
|
||||||
{
|
{
|
||||||
'creation': '2012-03-27 14:36:22',
|
'creation': '2012-05-03 16:16:21',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-03-27 14:36:22',
|
'modified': '2012-05-03 16:23:29',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
@ -22,7 +22,7 @@
|
|||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'section_style': u'Simple',
|
'section_style': u'Simple',
|
||||||
'server_code_error': u' ',
|
'server_code_error': u' ',
|
||||||
'version': 79
|
'version': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@ -85,16 +85,6 @@
|
|||||||
'width': u'50%'
|
'width': u'50%'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'enquiry',
|
|
||||||
'fieldtype': u'Check',
|
|
||||||
'hidden': 1,
|
|
||||||
'label': u'Opportunity',
|
|
||||||
'print_hide': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
@ -122,7 +112,7 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'receivable_voucher',
|
'fieldname': u'sales_invoice',
|
||||||
'fieldtype': u'Check',
|
'fieldtype': u'Check',
|
||||||
'label': u'Sales Invoice'
|
'label': u'Sales Invoice'
|
||||||
},
|
},
|
||||||
@ -155,16 +145,7 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'payable_voucher',
|
'fieldname': u'expense_claim',
|
||||||
'fieldtype': u'Check',
|
|
||||||
'label': u'Purchase Invoice',
|
|
||||||
'print_hide': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'expense_voucher',
|
|
||||||
'fieldtype': u'Check',
|
'fieldtype': u'Check',
|
||||||
'label': u'Expense Claim'
|
'label': u'Expense Claim'
|
||||||
},
|
},
|
||||||
@ -184,7 +165,7 @@
|
|||||||
'fieldname': u'select_transaction',
|
'fieldname': u'select_transaction',
|
||||||
'fieldtype': u'Select',
|
'fieldtype': u'Select',
|
||||||
'label': u'Select Transaction',
|
'label': u'Select Transaction',
|
||||||
'options': u'\nQuotation\nSales Order\nDelivery Note\nSales Invoice\nPayment Received\nPurchase Order\nPurchase Receipt\nPayment Sent',
|
'options': u'\nQuotation\nSales Order\nDelivery Note\nSales Invoice\nPurchase Order\nPurchase Receipt\nExpense Claim\nExpense Claim Approved\nExpense Claim Rejected',
|
||||||
'trigger': u'Client'
|
'trigger': u'Client'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -245,16 +226,6 @@
|
|||||||
'print_hide': 1
|
'print_hide': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'payment_received_message',
|
|
||||||
'fieldtype': u'Text',
|
|
||||||
'hidden': 1,
|
|
||||||
'label': u'Payment Received Message',
|
|
||||||
'print_hide': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
@ -278,17 +249,7 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'payment_sent_message',
|
'fieldname': u'expense_claim_approved_message',
|
||||||
'fieldtype': u'Text',
|
|
||||||
'hidden': 1,
|
|
||||||
'label': u'Payment Sent Message',
|
|
||||||
'print_hide': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'expense_voucher_approved_message',
|
|
||||||
'fieldtype': u'Text',
|
'fieldtype': u'Text',
|
||||||
'hidden': 1,
|
'hidden': 1,
|
||||||
'label': u'Expense Claim Approved Message',
|
'label': u'Expense Claim Approved Message',
|
||||||
@ -298,7 +259,7 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'expense_voucher_rejected_message',
|
'fieldname': u'expense_claim_rejected_message',
|
||||||
'fieldtype': u'Text',
|
'fieldtype': u'Text',
|
||||||
'hidden': 1,
|
'hidden': 1,
|
||||||
'label': u'Expense Claim Rejected Message',
|
'label': u'Expense Claim Rejected Message',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user