From cb4b9868d3b49fa260a14d53c9b71f7cd838df7a Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Tue, 12 Oct 2021 13:31:09 +0530 Subject: [PATCH 1/8] chore: Try on FCloud button --- .github/try-on-f-cloud-button.svg | 32 +++++++++++++++++++++++++++++++ README.md | 7 +++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/try-on-f-cloud-button.svg diff --git a/.github/try-on-f-cloud-button.svg b/.github/try-on-f-cloud-button.svg new file mode 100644 index 0000000000..fe0bb2c52d --- /dev/null +++ b/.github/try-on-f-cloud-button.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index f8a1907da2..ef471aa05a 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,12 @@ Full-stack web application framework that uses Python and MariaDB on the server side and a tightly integrated client side library. Built for [ERPNext](https://erpnext.com) +
+ + + +
+ ## Table of Contents * [Installation](#installation) * [Contributing](#contributing) @@ -46,6 +52,7 @@ Full-stack web application framework that uses Python and MariaDB on the server * [Install via Docker](https://github.com/frappe/frappe_docker) * [Install via Frappe Bench](https://github.com/frappe/bench) * [Offical Documentation](https://frappeframework.com/docs/user/en/installation) +* [Managed Hosting on Frappe Cloud](https://frappecloud.com/deploy?apps=frappe&source=frappe_readme) ## Contributing From 4146cd3ccaa0547668204320bcb5b603db063216 Mon Sep 17 00:00:00 2001 From: Summayya Hashmani <58825865+sumaiya2908@users.noreply.github.com> Date: Mon, 18 Oct 2021 09:28:44 +0530 Subject: [PATCH 2/8] refactor: child table layout in the web-form --- frappe/public/scss/website/index.scss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frappe/public/scss/website/index.scss b/frappe/public/scss/website/index.scss index c3da42ed34..e5e9fe95c6 100644 --- a/frappe/public/scss/website/index.scss +++ b/frappe/public/scss/website/index.scss @@ -192,8 +192,8 @@ h5.modal-title { } .hidden-xs { - @extend .d-none; - @extend .d-sm-block; + @extend .d-block; + @extend .d-sm-none; } .visible-xs { @@ -216,6 +216,10 @@ h5.modal-title { float: right; } +.pull-left { + float: left; +} + .image-with-blur { transition: filter 300ms ease-in-out; filter: blur(1.5rem); From f51b1cc73997fba7df1b356c4f82a877797d4868 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 18 Oct 2021 11:51:33 +0530 Subject: [PATCH 3/8] fix: Remove unnecessary missing_ok kwarg from unlink missing_ok added in PY38, this change breaks installs for PY37. ref: https://docs.python.org/3/library/pathlib.html#pathlib.Path.unlink --- frappe/installer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/installer.py b/frappe/installer.py index 1fe891c852..70dbbb61e8 100755 --- a/frappe/installer.py +++ b/frappe/installer.py @@ -507,14 +507,14 @@ def convert_archive_content(sql_file_path): sql_file_path = Path(sql_file_path) os.rename(sql_file_path, old_sql_file_path) - sql_file_path.unlink(missing_ok=True) + sql_file_path.unlink() sql_file_path.touch() with open(old_sql_file_path) as r, open(sql_file_path, "a") as w: for line in r: w.write(line.replace("ROW_FORMAT=COMPRESSED", "ROW_FORMAT=DYNAMIC")) - old_sql_file_path.unlink(missing_ok=True) + old_sql_file_path.unlink() def extract_sql_gzip(sql_gz_path): From 30c39acabe43de97a7fbe4a72cc6d0bcb933473c Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 18 Oct 2021 12:07:42 +0530 Subject: [PATCH 4/8] fix: Don't unlink file blindly This made sense with the missing_ok. But now, a try-except seems unnecessary too. Also, possibly destructive. Best to stray away from these things. --- frappe/installer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/frappe/installer.py b/frappe/installer.py index 70dbbb61e8..d1a13fdaab 100755 --- a/frappe/installer.py +++ b/frappe/installer.py @@ -507,7 +507,6 @@ def convert_archive_content(sql_file_path): sql_file_path = Path(sql_file_path) os.rename(sql_file_path, old_sql_file_path) - sql_file_path.unlink() sql_file_path.touch() with open(old_sql_file_path) as r, open(sql_file_path, "a") as w: From 5c5c17687284006e7a12dee69cd810e9f8be5fbc Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Mon, 18 Oct 2021 12:20:06 +0530 Subject: [PATCH 5/8] fix: Check if parent exist in col before getting doc This fixes following error while downloading auto email report ``` Traceback (most recent call last): File "/Users/sps/benches/develop/apps/frappe/frappe/app.py", line 66, in application response = frappe.api.handle() File "/Users/sps/benches/develop/apps/frappe/frappe/api.py", line 54, in handle return frappe.handler.handle() File "/Users/sps/benches/develop/apps/frappe/frappe/handler.py", line 31, in handle data = execute_cmd(cmd) File "/Users/sps/benches/develop/apps/frappe/frappe/handler.py", line 67, in execute_cmd return frappe.call(method, **frappe.form_dict) File "/Users/sps/benches/develop/apps/frappe/frappe/__init__.py", line 1205, in call return fn(*args, **newargs) File "/Users/sps/benches/develop/apps/frappe/frappe/email/doctype/auto_email_report/auto_email_report.py", line 196, in download data = auto_email_report.get_report_content() File "/Users/sps/benches/develop/apps/frappe/frappe/email/doctype/auto_email_report/auto_email_report.py", line 98, in get_report_content columns, data = make_links(columns, data) File "/Users/sps/benches/develop/apps/frappe/frappe/email/doctype/auto_email_report/auto_email_report.py", line 253, in make_links doc = frappe.get_doc(col.parent, doc_name) if doc_name else None File "/Users/sps/benches/develop/apps/frappe/frappe/__init__.py", line 883, in get_doc doc = frappe.model.document.get_doc(*args, **kwargs) File "/Users/sps/benches/develop/apps/frappe/frappe/model/document.py", line 62, in get_doc raise ValueError('First non keyword argument must be a string or dict') ValueError: First non keyword argument must be a string or dict ``` The issue was introduced via https://github.com/frappe/frappe/pull/13340 --- frappe/email/doctype/auto_email_report/auto_email_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/email/doctype/auto_email_report/auto_email_report.py b/frappe/email/doctype/auto_email_report/auto_email_report.py index 37089d58df..7081a84e7a 100644 --- a/frappe/email/doctype/auto_email_report/auto_email_report.py +++ b/frappe/email/doctype/auto_email_report/auto_email_report.py @@ -249,7 +249,7 @@ def make_links(columns, data): if col.options and row.get(col.fieldname) and row.get(col.options): row[col.fieldname] = get_link_to_form(row[col.options], row[col.fieldname]) elif col.fieldtype == "Currency" and row.get(col.fieldname): - doc = frappe.get_doc(col.parent, doc_name) if doc_name else None + doc = frappe.get_doc(col.parent, doc_name) if doc_name and col.parent else None # Pass the Document to get the currency based on docfield option row[col.fieldname] = frappe.format_value(row[col.fieldname], col, doc=doc) return columns, data From 20d7a9df78bb227a8f938558b52235162923ce4e Mon Sep 17 00:00:00 2001 From: Summayya Hashmani <58825865+sumaiya2908@users.noreply.github.com> Date: Mon, 18 Oct 2021 13:32:35 +0530 Subject: [PATCH 6/8] feat: Add confirm password field (#14281) * fix: remove commented code * refactor: add confirm password field * fix: remove dialog and add inline warning * fix: capitalize words and text function * fix: capitalize words * style: Fix formatting * refactor:update class name Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> * refactor: remove indicator class and add margin Co-authored-by: Summayya Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> --- frappe/www/update-password.html | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/frappe/www/update-password.html b/frappe/www/update-password.html index 0d66fe5ab5..cacbce35b3 100644 --- a/frappe/www/update-password.html +++ b/frappe/www/update-password.html @@ -10,7 +10,7 @@

{{ _("Reset Password") if frappe.db.get_default('company') else _("Set Password")}}

- +
+ + + +
@@ -38,7 +44,7 @@