diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json index 15bc97c2a4d..6768dfabfea 100644 --- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json +++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json @@ -1,4 +1,5 @@ { + "actions": [], "autoname": "hash", "creation": "2013-05-24 19:29:06", "doctype": "DocType", @@ -43,6 +44,7 @@ "base_amount", "pricing_rules", "is_free_item", + "is_fixed_asset", "section_break_29", "net_rate", "net_amount", @@ -708,11 +710,20 @@ "fieldname": "against_blanket_order", "fieldtype": "Check", "label": "Against Blanket Order" + }, + { + "default": "0", + "fetch_from": "item_code.is_fixed_asset", + "fieldname": "is_fixed_asset", + "fieldtype": "Check", + "label": "Is Fixed Asset", + "read_only": 1 } ], "idx": 1, "istable": 1, - "modified": "2019-11-19 14:10:52.865006", + "links": [], + "modified": "2019-12-06 13:17:12.142799", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order Item", diff --git a/erpnext/buying/setup_wizard_slide/add_a_few_suppliers/add_a_few_suppliers.json b/erpnext/buying/onboarding_slide/add_a_few_suppliers/add_a_few_suppliers.json similarity index 78% rename from erpnext/buying/setup_wizard_slide/add_a_few_suppliers/add_a_few_suppliers.json rename to erpnext/buying/onboarding_slide/add_a_few_suppliers/add_a_few_suppliers.json index 006d139eb02..d3adcb79812 100644 --- a/erpnext/buying/setup_wizard_slide/add_a_few_suppliers/add_a_few_suppliers.json +++ b/erpnext/buying/onboarding_slide/add_a_few_suppliers/add_a_few_suppliers.json @@ -3,18 +3,18 @@ "app": "ERPNext", "creation": "2019-11-15 14:45:32.626641", "docstatus": 0, - "doctype": "Setup Wizard Slide", + "doctype": "Onboarding Slide", "domains": [], "help_links": [ { - "label": "Supplier", + "label": "Learn More", "video_id": "zsrrVDk6VBs" } ], "idx": 0, - "image_src": "/assets/erpnext/images/illustrations/supplier.png", + "image_src": "/assets/erpnext/images/illustrations/supplier-onboard.png", "max_count": 3, - "modified": "2019-11-26 18:26:25.498325", + "modified": "2019-12-03 22:53:50.552445", "modified_by": "Administrator", "name": "Add A Few Suppliers", "owner": "Administrator", @@ -44,6 +44,5 @@ ], "slide_order": 50, "slide_title": "Add A Few Suppliers", - "slide_type": "Create", - "submit_method": "" + "slide_type": "Create" } \ No newline at end of file diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 55799544982..e3ece569641 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -606,6 +606,7 @@ def get_bom_items_as_dict(bom, company, qty=1, fetch_exploded=1, fetch_scrap_ite item.image, bom.project, item.stock_uom, + item.item_group, item.allow_alternative_item, item_default.default_warehouse, item_default.expense_account as expense_account, diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index c4481c9aa0e..e90821689bd 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -188,7 +188,8 @@ class Timesheet(Document): }, as_dict=True) # check internal overlap for time_log in self.time_logs: - if not (time_log.from_time or time_log.to_time): continue + if not (time_log.from_time and time_log.to_time + and args.from_time and args.to_time): continue if (fieldname != 'workstation' or args.get(fieldname) == time_log.get(fieldname)) and \ args.idx != time_log.idx and ((args.from_time > time_log.from_time and args.from_time < time_log.to_time) or diff --git a/erpnext/public/images/illustrations/collaboration.png b/erpnext/public/images/illustrations/collaboration.png deleted file mode 100644 index 12c67e394cc..00000000000 Binary files a/erpnext/public/images/illustrations/collaboration.png and /dev/null differ diff --git a/erpnext/public/images/illustrations/customer.png b/erpnext/public/images/illustrations/customer.png deleted file mode 100644 index b2ddbf3bb47..00000000000 Binary files a/erpnext/public/images/illustrations/customer.png and /dev/null differ diff --git a/erpnext/public/images/illustrations/customers-onboard.png b/erpnext/public/images/illustrations/customers-onboard.png new file mode 100644 index 00000000000..4a517bde29c Binary files /dev/null and b/erpnext/public/images/illustrations/customers-onboard.png differ diff --git a/erpnext/public/images/illustrations/desk-onboard.png b/erpnext/public/images/illustrations/desk-onboard.png new file mode 100644 index 00000000000..74b632dc30b Binary files /dev/null and b/erpnext/public/images/illustrations/desk-onboard.png differ diff --git a/erpnext/public/images/illustrations/letterhead-onboard.png b/erpnext/public/images/illustrations/letterhead-onboard.png new file mode 100644 index 00000000000..fdfd16ad9da Binary files /dev/null and b/erpnext/public/images/illustrations/letterhead-onboard.png differ diff --git a/erpnext/public/images/illustrations/letterhead.png b/erpnext/public/images/illustrations/letterhead.png deleted file mode 100644 index 37df6d7f6fc..00000000000 Binary files a/erpnext/public/images/illustrations/letterhead.png and /dev/null differ diff --git a/erpnext/public/images/illustrations/onboard.png b/erpnext/public/images/illustrations/onboard.png deleted file mode 100644 index 094aa3f8ddf..00000000000 Binary files a/erpnext/public/images/illustrations/onboard.png and /dev/null differ diff --git a/erpnext/public/images/illustrations/product.png b/erpnext/public/images/illustrations/product.png deleted file mode 100644 index f864b7af60e..00000000000 Binary files a/erpnext/public/images/illustrations/product.png and /dev/null differ diff --git a/erpnext/public/images/illustrations/products-onboard.png b/erpnext/public/images/illustrations/products-onboard.png new file mode 100644 index 00000000000..2dee2039e7d Binary files /dev/null and b/erpnext/public/images/illustrations/products-onboard.png differ diff --git a/erpnext/public/images/illustrations/supplier-onboard.png b/erpnext/public/images/illustrations/supplier-onboard.png new file mode 100644 index 00000000000..30335f2b63b Binary files /dev/null and b/erpnext/public/images/illustrations/supplier-onboard.png differ diff --git a/erpnext/public/images/illustrations/supplier.png b/erpnext/public/images/illustrations/supplier.png deleted file mode 100644 index 87f7789600f..00000000000 Binary files a/erpnext/public/images/illustrations/supplier.png and /dev/null differ diff --git a/erpnext/public/images/illustrations/user.png b/erpnext/public/images/illustrations/user.png deleted file mode 100644 index 7dd7db210d4..00000000000 Binary files a/erpnext/public/images/illustrations/user.png and /dev/null differ diff --git a/erpnext/regional/report/gstr_1/gstr_1.js b/erpnext/regional/report/gstr_1/gstr_1.js index ce559218cbd..1a7ff2bf5a6 100644 --- a/erpnext/regional/report/gstr_1/gstr_1.js +++ b/erpnext/regional/report/gstr_1/gstr_1.js @@ -55,14 +55,25 @@ frappe.query_reports["GSTR-1"] = { report.page.add_inner_button(__("Download as JSON"), function () { var filters = report.get_values(); - const args = { - cmd: 'erpnext.regional.report.gstr_1.gstr_1.get_json', - data: report.data, - report_name: report.report_name, - filters: filters - }; - - open_url_post(frappe.request.url, args); + frappe.call({ + method: 'erpnext.regional.report.gstr_1.gstr_1.get_json', + args: { + data: report.data, + report_name: report.report_name, + filters: filters + }, + callback: function(r) { + if (r.message) { + const args = { + cmd: 'erpnext.regional.report.gstr_1.gstr_1.download_json_file', + data: r.message.data, + report_name: r.message.report_name, + report_type: r.message.report_type + }; + open_url_post(frappe.request.url, args); + } + } + }); }); } } diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py index 090616b0777..4f9cc7ff7a0 100644 --- a/erpnext/regional/report/gstr_1/gstr_1.py +++ b/erpnext/regional/report/gstr_1/gstr_1.py @@ -532,16 +532,9 @@ class Gstr1Report(object): self.columns = self.invoice_columns + self.tax_columns + self.other_columns @frappe.whitelist() -def get_json(): - data = frappe._dict(frappe.local.form_dict) - - del data["cmd"] - if "csrf_token" in data: - del data["csrf_token"] - - filters = json.loads(data["filters"]) - report_data = json.loads(data["data"]) - report_name = data["report_name"] +def get_json(filters, report_name, data): + filters = json.loads(filters) + report_data = json.loads(data) gstin = get_company_gstin_number(filters["company"]) fp = "%02d%s" % (getdate(filters["to_date"]).month, getdate(filters["to_date"]).year) @@ -575,7 +568,11 @@ def get_json(): out = get_export_json(res) gst_json["exp"] = out - download_json_file(report_name, filters["type_of_business"], gst_json) + return { + 'report_name': report_name, + 'report_type': filters['type_of_business'], + 'data': gst_json + } def get_b2b_json(res, gstin): inv_type, out = {"Registered Regular": "R", "Deemed Export": "DE", "URD": "URD", "SEZ": "SEZ"}, [] @@ -722,11 +719,15 @@ def get_company_gstin_number(company): if gstin: return gstin[0]["gstin"] else: - frappe.throw(_("Please set valid GSTIN No. in Company Address")) + frappe.throw(_("Please set valid GSTIN No. in Company Address for company {0}".format( + frappe.bold(company) + ))) -def download_json_file(filename, report_type, data): +@frappe.whitelist() +def download_json_file(): ''' download json content in a file ''' - frappe.response['filename'] = frappe.scrub("{0} {1}".format(filename, report_type)) + '.json' - frappe.response['filecontent'] = json.dumps(data) + data = frappe._dict(frappe.local.form_dict) + frappe.response['filename'] = frappe.scrub("{0} {1}".format(data['report_name'], data['report_type'])) + '.json' + frappe.response['filecontent'] = data['data'] frappe.response['content_type'] = 'application/json' frappe.response['type'] = 'download' diff --git a/erpnext/selling/setup_wizard_slide/add_a_few_customers/add_a_few_customers.json b/erpnext/selling/onboarding_slide/add_a_few_customers/add_a_few_customers.json similarity index 77% rename from erpnext/selling/setup_wizard_slide/add_a_few_customers/add_a_few_customers.json rename to erpnext/selling/onboarding_slide/add_a_few_customers/add_a_few_customers.json index a0bb6fe26df..f39fea48960 100644 --- a/erpnext/selling/setup_wizard_slide/add_a_few_customers/add_a_few_customers.json +++ b/erpnext/selling/onboarding_slide/add_a_few_customers/add_a_few_customers.json @@ -3,18 +3,18 @@ "app": "ERPNext", "creation": "2019-11-15 14:44:10.065014", "docstatus": 0, - "doctype": "Setup Wizard Slide", + "doctype": "Onboarding Slide", "domains": [], "help_links": [ { - "label": "Customers", + "label": "Learn More", "video_id": "zsrrVDk6VBs" } ], "idx": 0, - "image_src": "/assets/erpnext/images/illustrations/customer.png", + "image_src": "/assets/erpnext/images/illustrations/customers-onboard.png", "max_count": 3, - "modified": "2019-11-26 18:26:15.888794", + "modified": "2019-12-03 22:54:28.959549", "modified_by": "Administrator", "name": "Add A Few Customers", "owner": "Administrator", @@ -44,6 +44,5 @@ ], "slide_order": 40, "slide_title": "Add A Few Customers", - "slide_type": "Create", - "submit_method": "" + "slide_type": "Create" } \ No newline at end of file diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py index 0bcddc21517..4d2d540bbc8 100644 --- a/erpnext/setup/doctype/email_digest/email_digest.py +++ b/erpnext/setup/doctype/email_digest/email_digest.py @@ -283,7 +283,7 @@ class EmailDigest(Document): card.value = card.value *-1 card.value = self.fmt_money(card.value,False if key in ("bank_balance", "credit_balance") else True) - cache.setex(cache_key, card, 24 * 60 * 60) + cache.set_value(cache_key, card, expires_in_sec=24 * 60 * 60) context.cards.append(card) diff --git a/erpnext/setup/onboarding_slide/welcome_back_to_erpnext!/welcome_back_to_erpnext!.json b/erpnext/setup/onboarding_slide/welcome_back_to_erpnext!/welcome_back_to_erpnext!.json new file mode 100644 index 00000000000..bf330d09de4 --- /dev/null +++ b/erpnext/setup/onboarding_slide/welcome_back_to_erpnext!/welcome_back_to_erpnext!.json @@ -0,0 +1,23 @@ +{ + "add_more_button": 0, + "app": "ERPNext", + "creation": "2019-12-04 19:21:39.995776", + "docstatus": 0, + "doctype": "Onboarding Slide", + "domains": [], + "help_links": [], + "idx": 0, + "image_src": "/assets/erpnext/images/illustrations/desk-onboard.png", + "is_completed": 0, + "max_count": 3, + "modified": "2019-12-04 19:21:39.995776", + "modified_by": "Administrator", + "name": "Welcome back to ERPNext!", + "owner": "Administrator", + "slide_desc": "
Let's continue where you left from!
", + "slide_fields": [], + "slide_module": "Setup", + "slide_order": 0, + "slide_title": "Welcome back to ERPNext!", + "slide_type": "Continue" +} \ No newline at end of file diff --git a/erpnext/setup/setup_wizard_slide/welcome_to_erpnext!/welcome_to_erpnext!.json b/erpnext/setup/onboarding_slide/welcome_to_erpnext!/welcome_to_erpnext!.json similarity index 60% rename from erpnext/setup/setup_wizard_slide/welcome_to_erpnext!/welcome_to_erpnext!.json rename to erpnext/setup/onboarding_slide/welcome_to_erpnext!/welcome_to_erpnext!.json index 1da9dd44e2b..4ea69852afa 100644 --- a/erpnext/setup/setup_wizard_slide/welcome_to_erpnext!/welcome_to_erpnext!.json +++ b/erpnext/setup/onboarding_slide/welcome_to_erpnext!/welcome_to_erpnext!.json @@ -3,20 +3,20 @@ "app": "ERPNext", "creation": "2019-11-26 17:01:26.671859", "docstatus": 0, - "doctype": "Setup Wizard Slide", + "doctype": "Onboarding Slide", "domains": [], "help_links": [], "idx": 0, - "image_src": "/assets/erpnext/images/illustrations/onboard.png", + "image_src": "/assets/erpnext/images/illustrations/desk-onboard.png", "max_count": 0, - "modified": "2019-11-26 17:17:29.813299", + "modified": "2019-12-03 22:49:12.871260", "modified_by": "Administrator", "name": "Welcome to ERPNext!", "owner": "Administrator", - "slide_desc": "Setting up an ERP can be overwhelming. But don't worry, we have got your back!