blob: be072fc47f38783a347b92b85f3320e0404d3bc8 [file] [log] [blame]
Saurabh68ea6082019-01-15 14:47:14 +05301from __future__ import unicode_literals
Chillar Anand915b3432021-09-02 16:44:59 +05302
Suraj Shetty00cced12018-05-03 19:06:32 +05303from frappe import _
4
5doctype_list = [
Suraj Shetty627a3dc2019-09-17 15:54:41 +05306 'Purchase Receipt',
7 'Purchase Invoice',
8 'Quotation',
9 'Sales Order',
10 'Delivery Note',
11 'Sales Invoice'
Suraj Shetty00cced12018-05-03 19:06:32 +053012]
13
14def get_message(doctype):
Suraj Shetty627a3dc2019-09-17 15:54:41 +053015 return _("{0} has been submitted successfully").format(_(doctype))
Suraj Shetty00cced12018-05-03 19:06:32 +053016
17def get_first_success_message(doctype):
Suraj Shetty627a3dc2019-09-17 15:54:41 +053018 return get_message(doctype)
Suraj Shetty00cced12018-05-03 19:06:32 +053019
20def get_default_success_action():
Suraj Shetty627a3dc2019-09-17 15:54:41 +053021 return [{
22 'doctype': 'Success Action',
23 'ref_doctype': doctype,
24 'message': get_message(doctype),
25 'first_success_message': get_first_success_message(doctype),
26 'next_actions': 'new\nprint\nemail'
27 } for doctype in doctype_list]