brotherton-erpnext/erpnext/setup/default_success_action.py
Suraj Shetty 00cced12a0 Success Action (#13666)
* success action config for  sales invoice

* remove "Notification Control" doctype and its usage

* add default success action after_install or while migration (patch)

* rename for_doctype to ref_doctype

* case change

* minor fix

* Remove unnecessary code

* Replace message with translatable message

* Fix 'cannot import error'
2018-05-03 19:06:32 +05:30

27 lines
684 B
Python

from frappe import _
doctype_list = [
'Purchase Receipt',
'Purchase Invoice',
'Quotation',
'Sales Order',
'Delivery Note',
'Sales Invoice'
]
def get_message(doctype):
return _("{0} has been submitted successfully".format(_(doctype)))
def get_first_success_message(doctype):
return _("{0} has been submitted successfully".format(_(doctype)))
def get_default_success_action():
return [{
'doctype': 'Success Action',
'ref_doctype': doctype,
'message': get_message(doctype),
'first_success_message': get_first_success_message(doctype),
'next_actions': 'new\nprint\nemail'
} for doctype in doctype_list]