2018-05-03 13:36:32 +00:00
|
|
|
from frappe import _
|
|
|
|
|
|
|
|
doctype_list = [
|
2019-09-17 10:24:41 +00:00
|
|
|
"Purchase Receipt",
|
|
|
|
"Purchase Invoice",
|
|
|
|
"Quotation",
|
|
|
|
"Sales Order",
|
|
|
|
"Delivery Note",
|
|
|
|
"Sales Invoice",
|
2018-05-03 13:36:32 +00:00
|
|
|
]
|
|
|
|
|
2022-03-28 13:22:46 +00:00
|
|
|
|
2018-05-03 13:36:32 +00:00
|
|
|
def get_message(doctype):
|
2019-09-17 10:24:41 +00:00
|
|
|
return _("{0} has been submitted successfully").format(_(doctype))
|
2018-05-03 13:36:32 +00:00
|
|
|
|
2022-03-28 13:22:46 +00:00
|
|
|
|
2018-05-03 13:36:32 +00:00
|
|
|
def get_first_success_message(doctype):
|
2019-09-17 10:24:41 +00:00
|
|
|
return get_message(doctype)
|
2018-05-03 13:36:32 +00:00
|
|
|
|
2022-03-28 13:22:46 +00:00
|
|
|
|
2018-05-03 13:36:32 +00:00
|
|
|
def get_default_success_action():
|
2019-09-17 10:24:41 +00:00
|
|
|
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
|
|
|
|
]
|