Suraj Shetty | 00cced1 | 2018-05-03 19:06:32 +0530 | [diff] [blame] | 1 | from frappe import _ |
| 2 | |
| 3 | doctype_list = [ |
| 4 | 'Purchase Receipt', |
| 5 | 'Purchase Invoice', |
| 6 | 'Quotation', |
| 7 | 'Sales Order', |
| 8 | 'Delivery Note', |
| 9 | 'Sales Invoice' |
| 10 | ] |
| 11 | |
| 12 | def get_message(doctype): |
| 13 | return _("{0} has been submitted successfully".format(_(doctype))) |
| 14 | |
| 15 | def get_first_success_message(doctype): |
| 16 | return _("{0} has been submitted successfully".format(_(doctype))) |
| 17 | |
| 18 | def get_default_success_action(): |
| 19 | return [{ |
| 20 | 'doctype': 'Success Action', |
| 21 | 'ref_doctype': doctype, |
| 22 | 'message': get_message(doctype), |
| 23 | 'first_success_message': get_first_success_message(doctype), |
| 24 | 'next_actions': 'new\nprint\nemail' |
| 25 | } for doctype in doctype_list] |
| 26 | |