diff --git a/erpnext/patches.txt b/erpnext/patches.txt index fcf5cfcc92b..2c28b9281ff 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -439,7 +439,7 @@ erpnext.patches.v8_7.add_more_gst_fields #21-09-2017 erpnext.patches.v8_7.fix_purchase_receipt_status erpnext.patches.v8_6.rename_bom_update_tool erpnext.patches.v8_7.set_offline_in_pos_settings #11-09-17 -erpnext.patches.v8_9.add_setup_progress_actions #08-09-2017 #26-09-2017 +erpnext.patches.v8_9.add_setup_progress_actions #08-09-2017 #26-09-2017 #22-11-2017 erpnext.patches.v8_9.rename_company_sales_target_field erpnext.patches.v8_8.set_bom_rate_as_per_uom erpnext.patches.v8_8.add_new_fields_in_accounts_settings diff --git a/erpnext/patches/v8_9/add_setup_progress_actions.py b/erpnext/patches/v8_9/add_setup_progress_actions.py index dbd0face7b7..fe123111bce 100644 --- a/erpnext/patches/v8_9/add_setup_progress_actions.py +++ b/erpnext/patches/v8_9/add_setup_progress_actions.py @@ -30,6 +30,8 @@ def execute(): {"action_name": "Add Rooms", "action_doctype": "Room", "min_doc_count": 1, "is_completed": 0, "domains": '["Education"]' }, {"action_name": "Add Users", "action_doctype": "User", "min_doc_count": 4, "is_completed": 0, + "domains": '[]' }, + {"action_name": "Add Letterhead", "action_doctype": "Letter Head", "min_doc_count": 1, "is_completed": 0, "domains": '[]' } ] diff --git a/erpnext/setup/setup_wizard/install_fixtures.py b/erpnext/setup/setup_wizard/install_fixtures.py index 95c562ad06d..ed89568947d 100644 --- a/erpnext/setup/setup_wizard/install_fixtures.py +++ b/erpnext/setup/setup_wizard/install_fixtures.py @@ -44,6 +44,8 @@ def install(country=None): {"action_name": "Add Rooms", "action_doctype": "Room", "min_doc_count": 1, "is_completed": 0, "domains": '["Education"]' }, {"action_name": "Add Users", "action_doctype": "User", "min_doc_count": 4, "is_completed": 0, + "domains": '[]' }, + {"action_name": "Add Letterhead", "action_doctype": "Letter Head", "min_doc_count": 1, "is_completed": 0, "domains": '[]' } ]}, diff --git a/erpnext/utilities/user_progress.py b/erpnext/utilities/user_progress.py index 685624e030f..e84377e1e8b 100644 --- a/erpnext/utilities/user_progress.py +++ b/erpnext/utilities/user_progress.py @@ -81,6 +81,24 @@ def get_slide_settings(): } ] ), + + frappe._dict( + action_name='Add Letterhead', + domains=('Manufacturing', 'Services', 'Retail', 'Distribution', 'Education'), + title=_("Add Letterhead"), + help=_("Upload your letter head (Keep it web friendly as 900px by 100px)"), + fields=[ + {"fieldtype":"Attach Image", "fieldname":"letterhead", + "is_private": 0, + "align": "center" + }, + ], + mandatory_entry=1, + submit_method="erpnext.utilities.user_progress_utils.create_letterhead", + done_state_title=_("Go to Letterheads"), + done_state_title_route=["List", "Letter Head"] + ), + frappe._dict( action_name='Add Suppliers', domains=('Manufacturing', 'Services', 'Retail', 'Distribution'), diff --git a/erpnext/utilities/user_progress_utils.py b/erpnext/utilities/user_progress_utils.py index 1af5364d101..08dd7efe191 100644 --- a/erpnext/utilities/user_progress_utils.py +++ b/erpnext/utilities/user_progress_utils.py @@ -37,6 +37,21 @@ def create_customers(args_data): except frappe.NameError: pass +@frappe.whitelist() +def create_letterhead(args_data): + args = json.loads(args_data) + letterhead = args.get("letterhead") + if letterhead: + try: + frappe.get_doc({ + "doctype":"Letter Head", + "content":"""