From aa8f7cc3c5470811d4851b7d4a80c8332d2aa541 Mon Sep 17 00:00:00 2001 From: prssanna Date: Wed, 10 Mar 2021 16:02:52 +0530 Subject: [PATCH 01/18] fix: uncomment conditions that handle guest access for desk --- frappe/www/app.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frappe/www/app.py b/frappe/www/app.py index 79b430019e..6088c413dc 100644 --- a/frappe/www/app.py +++ b/frappe/www/app.py @@ -12,10 +12,10 @@ from frappe import _ import frappe.sessions def get_context(context): - # if frappe.session.user == "Guest": - # frappe.throw(_("Log in to access this page."), frappe.PermissionError) - # elif frappe.db.get_value("User", frappe.session.user, "user_type") == "Website User": - # frappe.throw(_("You are not permitted to access this page."), frappe.PermissionError) + if frappe.session.user == "Guest": + frappe.throw(_("Log in to access this page."), frappe.PermissionError) + elif frappe.db.get_value("User", frappe.session.user, "user_type") == "Website User": + frappe.throw(_("You are not permitted to access this page."), frappe.PermissionError) hooks = frappe.get_hooks() try: From 91cb71f0c9f4d3469b99ccf160b62d8ebe5e76a2 Mon Sep 17 00:00:00 2001 From: prssanna Date: Wed, 10 Mar 2021 18:14:33 +0530 Subject: [PATCH 02/18] fix: don't show social login icon if not set --- frappe/www/login.html | 5 ++++- frappe/www/login.py | 14 ++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/frappe/www/login.html b/frappe/www/login.html index 2edec28375..deafc2015c 100644 --- a/frappe/www/login.html +++ b/frappe/www/login.html @@ -85,7 +85,10 @@ {% endfor %} diff --git a/frappe/www/login.py b/frappe/www/login.py index 54d3ccfb1e..76b232f8ee 100644 --- a/frappe/www/login.py +++ b/frappe/www/login.py @@ -25,7 +25,7 @@ def get_context(context): redirect_to = get_home_page() else: redirect_to = "/app" - + if redirect_to != 'login': frappe.local.flags.redirect_location = redirect_to raise frappe.Redirect @@ -44,11 +44,13 @@ def get_context(context): client_secret = get_decrypted_password("Social Login Key", provider, "client_secret") provider_name = frappe.get_value("Social Login Key", provider, "provider_name") - if provider_name != "Custom": - icon_url = frappe.get_value("Social Login Key", provider, "icon") - icon = "{1}".format(icon_url, provider_name) - else: - icon = get_icon_html(frappe.get_value("Social Login Key", provider, "icon"), small=True) + icon = None + icon_url = frappe.get_value("Social Login Key", provider, "icon") + if icon_url: + if provider_name != "Custom": + icon = "{1}".format(icon_url, provider_name) + else: + icon = get_icon_html(icon_url, small=True) if (get_oauth_keys(provider) and client_secret and client_id and base_url): context.provider_logins.append({ From 89b9c29802e2f8c505a615971d06b8b6b4d9ca9d Mon Sep 17 00:00:00 2001 From: prssanna Date: Wed, 10 Mar 2021 18:14:52 +0530 Subject: [PATCH 03/18] chore: update frappe charts --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 43cedc158a..40bed18cb7 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "driver.js": "^0.9.8", "express": "^4.17.1", "fast-deep-equal": "^2.0.1", - "frappe-charts": "^2.0.0-rc5", + "frappe-charts": "^2.0.0-rc10", "frappe-datatable": "^1.15.3", "frappe-gantt": "^0.5.0", "fuse.js": "^3.4.6", diff --git a/yarn.lock b/yarn.lock index daca81cfda..921c174e6c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2467,10 +2467,10 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -frappe-charts@^2.0.0-rc5: - version "2.0.0-rc5" - resolved "https://registry.yarnpkg.com/frappe-charts/-/frappe-charts-2.0.0-rc5.tgz#16f5c744c3cdb134a41bb4581ea3c816e6b8601f" - integrity sha512-4wEsSeGVlEBxr3qA2FF/CTrn+XRjf73txdID+vEBhr22Osc+wcJNhY5sJWFtq4wrihz3WHFnNOTGu+uUNdb0lw== +frappe-charts@^2.0.0-rc10: + version "2.0.0-rc10" + resolved "https://registry.yarnpkg.com/frappe-charts/-/frappe-charts-2.0.0-rc10.tgz#6e4cfbb99eb48374f78c0c048e1b04f278a3848a" + integrity sha512-qj1yFdBF7e0aW6xES/SK7cb4plimcm63ENG/0HOMKprijNj0V938/v9uhe1lSATvuqu65pPkHNbt93zfCLx9gQ== frappe-datatable@^1.15.3: version "1.15.3" From 882ea6e3d141a8144aa9f45a69f10598dd3f3670 Mon Sep 17 00:00:00 2001 From: prssanna Date: Wed, 10 Mar 2021 18:23:59 +0530 Subject: [PATCH 04/18] fix: missing bracket in get_inner_group_button --- frappe/public/js/frappe/ui/page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/ui/page.js b/frappe/public/js/frappe/ui/page.js index 705d1ac8cd..96e31c7d62 100644 --- a/frappe/public/js/frappe/ui/page.js +++ b/frappe/public/js/frappe/ui/page.js @@ -537,7 +537,7 @@ frappe.ui.Page = Class.extend({ }, get_inner_group_button: function(label) { - return this.inner_toolbar.find(`.inner-group-button[data-label="${encodeURIComponent(label)}"`); + return this.inner_toolbar.find(`.inner-group-button[data-label="${encodeURIComponent(label)}"]`); }, set_inner_btn_group_as_primary: function(label) { From dcbce242a92d5fd924382f756436c8fe452288bb Mon Sep 17 00:00:00 2001 From: prssanna Date: Wed, 10 Mar 2021 18:42:43 +0530 Subject: [PATCH 05/18] fix: toast red indicator icon --- frappe/public/js/frappe/ui/messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/ui/messages.js b/frappe/public/js/frappe/ui/messages.js index a4b1ad9f79..b3cbef1b8e 100644 --- a/frappe/public/js/frappe/ui/messages.js +++ b/frappe/public/js/frappe/ui/messages.js @@ -357,7 +357,7 @@ frappe.show_alert = function(message, seconds=7, actions={}) { 'yellow': "solid-warning", 'blue': "solid-success", 'green': "solid-success", - 'red': "solid-red" + 'red': "solid-error" }; if (typeof message==='string') { From 1937a1e558e7e5cb377369ad87fef279a711fe39 Mon Sep 17 00:00:00 2001 From: prssanna Date: Thu, 11 Mar 2021 14:21:00 +0530 Subject: [PATCH 06/18] fix: web form buttons --- frappe/public/js/frappe/web_form/web_form.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frappe/public/js/frappe/web_form/web_form.js b/frappe/public/js/frappe/web_form/web_form.js index 0421147d49..44d11b1e20 100644 --- a/frappe/public/js/frappe/web_form/web_form.js +++ b/frappe/public/js/frappe/web_form/web_form.js @@ -88,16 +88,16 @@ export default class WebForm extends frappe.ui.FieldGroup { setup_delete_button() { this.add_button_to_header( - '', - "light", + frappe.utils.icon('delete'), + "danger", () => this.delete() ); } setup_print_button() { this.add_button_to_header( - '', - "light", + frappe.utils.icon('print'), + "primary", () => this.print() ); } From 72192e4a1028fae116ef0a63eb90a2cd3f5640ca Mon Sep 17 00:00:00 2001 From: prssanna Date: Thu, 11 Mar 2021 14:22:38 +0530 Subject: [PATCH 07/18] fix: web form style --- frappe/public/scss/website/web_form.scss | 17 +++++++++++++++++ .../doctype/web_form/templates/web_form.html | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 frappe/public/scss/website/web_form.scss diff --git a/frappe/public/scss/website/web_form.scss b/frappe/public/scss/website/web_form.scss new file mode 100644 index 0000000000..48f77000bf --- /dev/null +++ b/frappe/public/scss/website/web_form.scss @@ -0,0 +1,17 @@ +@import "../common/form"; + +.web-form-wrapper { + .form-control { + color: var(--text-color); + } + + .form-column { + &:first-child { + padding-left: 0; + } + + &:last-child { + padding-right: 0; + } + } +} \ No newline at end of file diff --git a/frappe/website/doctype/web_form/templates/web_form.html b/frappe/website/doctype/web_form/templates/web_form.html index 228898df66..96bd9209cc 100644 --- a/frappe/website/doctype/web_form/templates/web_form.html +++ b/frappe/website/doctype/web_form/templates/web_form.html @@ -62,7 +62,7 @@ data-web-form="{{ name }}" data-web-form-doctype="{{ doc_type }}" data-login-req {% endif %} {# attachments #} {% if allow_comments and not frappe.form_dict.new and not is_list -%} -
+

{{ _("Comments") }}

{% include 'templates/includes/comments/comments.html' %}
From ec004cc1b750abc558e55f6bc719f846e941c211 Mon Sep 17 00:00:00 2001 From: prssanna Date: Thu, 11 Mar 2021 14:26:53 +0530 Subject: [PATCH 08/18] refactor: common form styles --- frappe/public/scss/common/form.scss | 29 +++++++++++++++++++++++++++++ frappe/public/scss/desk/form.scss | 24 +----------------------- 2 files changed, 30 insertions(+), 23 deletions(-) create mode 100644 frappe/public/scss/common/form.scss diff --git a/frappe/public/scss/common/form.scss b/frappe/public/scss/common/form.scss new file mode 100644 index 0000000000..2fa6ab619e --- /dev/null +++ b/frappe/public/scss/common/form.scss @@ -0,0 +1,29 @@ +.form-control { + border: none; + font-size: var(--text-md); + position: relative; +} + +.form-control.bold { + font-weight: 500; +} + +.like-disabled-input { + .for-description { + font-weight: normal; + font-size: var(--text-sm); + } + min-height: var(--input-height); + border-radius: $border-radius; + font-weight: 400; + padding: 8px 12px; + cursor: default; + color: var(--disabled-text-color); + background-color: var(--disabled-control-bg); +} + +.head-title { + font-size: var(--text-lg); + font-weight: 700; + color: var(--heading-color); +} \ No newline at end of file diff --git a/frappe/public/scss/desk/form.scss b/frappe/public/scss/desk/form.scss index 9f22d9283a..0bb686f045 100644 --- a/frappe/public/scss/desk/form.scss +++ b/frappe/public/scss/desk/form.scss @@ -1,8 +1,4 @@ -.form-control { - border: none; - font-size: var(--text-md); - position: relative; -} +@import "../common/form.scss"; .form-section, .form-dashboard-section { margin: 0px; @@ -82,24 +78,6 @@ text-align: right; } -.form-control.bold { - font-weight: 500; -} - -.like-disabled-input { - .for-description { - font-weight: normal; - font-size: var(--text-sm); - } - min-height: var(--input-height); - border-radius: $border-radius; - font-weight: 400; - padding: 8px 12px; - cursor: default; - color: var(--disabled-text-color); - background-color: var(--disabled-control-bg); -} - .form-control:disabled, .form-control[readonly] { cursor: not-allowed; } From 1581c99da72ad0d3ccf8f6138e12d7c2d38b8960 Mon Sep 17 00:00:00 2001 From: prssanna Date: Thu, 11 Mar 2021 14:27:35 +0530 Subject: [PATCH 09/18] fix: commonify quill styles for website and desk --- frappe/public/scss/{desk => common}/quill.scss | 0 frappe/public/scss/desk/index.scss | 2 +- frappe/public/scss/print.scss | 2 +- frappe/public/scss/website/index.scss | 5 ++--- 4 files changed, 4 insertions(+), 5 deletions(-) rename frappe/public/scss/{desk => common}/quill.scss (100%) diff --git a/frappe/public/scss/desk/quill.scss b/frappe/public/scss/common/quill.scss similarity index 100% rename from frappe/public/scss/desk/quill.scss rename to frappe/public/scss/common/quill.scss diff --git a/frappe/public/scss/desk/index.scss b/frappe/public/scss/desk/index.scss index 5f5fef251b..f7449640fd 100644 --- a/frappe/public/scss/desk/index.scss +++ b/frappe/public/scss/desk/index.scss @@ -43,5 +43,5 @@ @import "user_profile"; @import "theme_switcher"; @import "link_preview"; -@import "quill"; +@import "../common/quill"; @import "plyr"; diff --git a/frappe/public/scss/print.scss b/frappe/public/scss/print.scss index 2539ff82d2..a610299159 100644 --- a/frappe/public/scss/print.scss +++ b/frappe/public/scss/print.scss @@ -1,5 +1,5 @@ // @import "~bootstrap/scss/bootstrap"; -@import './desk/quill'; +@import './common/quill'; @import "./desk/css_variables"; diff --git a/frappe/public/scss/website/index.scss b/frappe/public/scss/website/index.scss index c6b3771562..de81174d3b 100644 --- a/frappe/public/scss/website/index.scss +++ b/frappe/public/scss/website/index.scss @@ -1,6 +1,4 @@ -@import '~quill/dist/quill.core'; -@import '~quill/dist/quill.snow.css'; -@import '~quill/dist/quill.bubble.css'; +@import '../common/quill'; @import 'variables'; @import '~bootstrap/scss/bootstrap'; @import "../common/mixins"; @@ -15,6 +13,7 @@ @import 'multilevel_dropdown'; @import 'website_image'; @import 'website_avatar'; +@import 'web_form'; @import 'page_builder'; @import 'blog'; @import 'markdown'; From 9386dbc1d316128d447223f771159a9e7ac6ade7 Mon Sep 17 00:00:00 2001 From: prssanna Date: Thu, 11 Mar 2021 14:28:02 +0530 Subject: [PATCH 10/18] fix: more button in web list --- frappe/templates/includes/list/list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/templates/includes/list/list.html b/frappe/templates/includes/list/list.html index cfe25f3682..fba5f20ed5 100644 --- a/frappe/templates/includes/list/list.html +++ b/frappe/templates/includes/list/list.html @@ -18,7 +18,7 @@ {{ item }} {% endfor %}
- From 4246f8f3d8f3c901cb45ca4003028d7010c4622a Mon Sep 17 00:00:00 2001 From: prssanna Date: Thu, 11 Mar 2021 14:31:42 +0530 Subject: [PATCH 11/18] fix: web form print button --- frappe/public/js/frappe/web_form/web_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/web_form/web_form.js b/frappe/public/js/frappe/web_form/web_form.js index 44d11b1e20..c490c5c66c 100644 --- a/frappe/public/js/frappe/web_form/web_form.js +++ b/frappe/public/js/frappe/web_form/web_form.js @@ -97,7 +97,7 @@ export default class WebForm extends frappe.ui.FieldGroup { setup_print_button() { this.add_button_to_header( frappe.utils.icon('print'), - "primary", + "light", () => this.print() ); } From 97f7f6345bdcedc8c3a51b0af89cf6b3934f884f Mon Sep 17 00:00:00 2001 From: prssanna Date: Thu, 11 Mar 2021 18:55:11 +0530 Subject: [PATCH 12/18] fix: select field condition to check if value is selected --- frappe/public/js/frappe/form/controls/select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/form/controls/select.js b/frappe/public/js/frappe/form/controls/select.js index 2ea32e032c..0fcfadb47d 100644 --- a/frappe/public/js/frappe/form/controls/select.js +++ b/frappe/public/js/frappe/form/controls/select.js @@ -96,7 +96,7 @@ frappe.ui.form.ControlSelect = frappe.ui.form.ControlData.extend({ } }, toggle_placeholder: function() { - const input_set = Boolean(this.$input.val()); + const input_set = Boolean(this.$input.find('option:selected').text()); this.$wrapper.find('.placeholder').toggle(!input_set); } }); From 7148af3c207a963040333574973dbdadb122aa34 Mon Sep 17 00:00:00 2001 From: Mohammad Hasnain Mohsin Rajan Date: Fri, 12 Mar 2021 22:44:30 +0530 Subject: [PATCH 13/18] ci: Fix Github Action (#12574) --- .github/helper/install.sh | 6 ++---- .github/helper/install_dependencies.sh | 10 ++++++---- .github/helper/roulette.py | 6 ++++-- .github/helper/run_tests.sh | 20 -------------------- .github/workflows/ci-tests.yml | 23 ++++++++++++++++++++++- 5 files changed, 34 insertions(+), 31 deletions(-) delete mode 100644 .github/helper/run_tests.sh diff --git a/.github/helper/install.sh b/.github/helper/install.sh index ee92ddd645..f6f0cad31a 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -1,10 +1,8 @@ #!/bin/bash -cd ~ || exit +set -e -# shellcheck disable=SC1091 -source ./.nvm/nvm.sh -nvm install 12 +cd ~ || exit pip install frappe-bench diff --git a/.github/helper/install_dependencies.sh b/.github/helper/install_dependencies.sh index 0ca509ef94..9be8519d85 100644 --- a/.github/helper/install_dependencies.sh +++ b/.github/helper/install_dependencies.sh @@ -1,9 +1,11 @@ #!/bin/bash -python "${GITHUB_WORKSPACE}/.github/helper/roulette.py" -if [[ $? != 2 ]];then - exit; -fi +set -e + +# python "${GITHUB_WORKSPACE}/.github/helper/roulette.py" +# if [[ $? != 2 ]];then +# exit; +# fi # install wkhtmltopdf wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz diff --git a/.github/helper/roulette.py b/.github/helper/roulette.py index 4d83137199..ba775d6794 100644 --- a/.github/helper/roulette.py +++ b/.github/helper/roulette.py @@ -24,10 +24,12 @@ def is_docs(file): if __name__ == "__main__": build_type = os.environ.get("TYPE") - commit_range = os.environ.get("TRAVIS_COMMIT_RANGE") + before = os.environ.get("BEFORE") + after = os.environ.get("AFTER") + commit_range = before + '...' + after print("Build Type: {}".format(build_type)) print("Commit Range: {}".format(commit_range)) - + try: files_changed = get_output("git diff --name-only {}".format(commit_range), shell=False) except Exception: diff --git a/.github/helper/run_tests.sh b/.github/helper/run_tests.sh deleted file mode 100644 index d7d50650da..0000000000 --- a/.github/helper/run_tests.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -cd ~/frappe-bench/ || exit - -if [ "$TYPE" == "server" ]; then - - if [ "$DB" == "mariadb" ]; then - bench --verbose --site test_site run-tests --coverage - fi - - if [ "$DB" == "postgres" ]; then - bench --verbose --site test_site run-tests --coverage - fi - -fi - -if [ "$TYPE" == "ui" ]; then - bench --site test_site execute frappe.utils.install.complete_setup_wizard - bench --site test_site run-ui-tests frappe --headless -fi \ No newline at end of file diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 83b34ece3a..1464446c82 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -15,12 +15,17 @@ jobs: - DB: "mariadb" TYPE: "server" JOB_NAME: "Python MariaDB" + RUN_COMMAND: bench --verbose --site test_site run-tests --coverage + - DB: "postgres" TYPE: "server" JOB_NAME: "Python PostgreSQL" + RUN_COMMAND: bench --verbose --site test_site run-tests --coverage + - DB: "mariadb" TYPE: "ui" JOB_NAME: "UI MariaDB" + RUN_COMMAND: bench --site test_site run-ui-tests frappe --headless name: ${{ matrix.JOB_NAME }} @@ -54,6 +59,11 @@ jobs: with: python-version: 3.7 + - uses: actions/setup-node@v2 + with: + node-version: '12' + check-latest: true + - name: Add to Hosts run: | echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts @@ -103,6 +113,10 @@ jobs: - name: Install Dependencies run: bash ${GITHUB_WORKSPACE}/.github/helper/install_dependencies.sh + env: + BEFORE: ${{ env.GITHUB_EVENT_PATH.before }} + AFTER: ${{ env.GITHUB_EVENT_PATH.after }} + TYPE: ${{ matrix.TYPE }} - name: Install run: bash ${GITHUB_WORKSPACE}/.github/helper/install.sh @@ -110,8 +124,15 @@ jobs: DB: ${{ matrix.DB }} TYPE: ${{ matrix.TYPE }} + - name: Run Set-Up + if: matrix.TYPE == 'ui' + run: cd ~/frappe-bench/ && bench --site test_site execute frappe.utils.install.complete_setup_wizard + env: + DB: ${{ matrix.DB }} + TYPE: ${{ matrix.TYPE }} + - name: Run Tests - run: bash ${GITHUB_WORKSPACE}/.github/helper/run_tests.sh + run: cd ~/frappe-bench/ && ${{ matrix.RUN_COMMAND }} env: DB: ${{ matrix.DB }} TYPE: ${{ matrix.TYPE }} From 6ed9567b8ce267666c0964613cf86b57e23c468b Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Sat, 13 Mar 2021 00:14:12 +0530 Subject: [PATCH 14/18] fix: remove unused paramter (#12575) --- frappe/commands/utils.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frappe/commands/utils.py b/frappe/commands/utils.py index b3f85d13ad..5ff66171fc 100644 --- a/frappe/commands/utils.py +++ b/frappe/commands/utils.py @@ -483,7 +483,6 @@ def console(context): @click.option('--doctype', help="For DocType") @click.option('--doctype-list-path', help="Path to .txt file for list of doctypes. Example erpnext/tests/server/agriculture.txt") @click.option('--test', multiple=True, help="Specific test") -@click.option('--driver', help="For Travis") @click.option('--ui-tests', is_flag=True, default=False, help="Run UI Tests") @click.option('--module', help="Run tests in a module") @click.option('--profile', is_flag=True, default=False) @@ -493,9 +492,9 @@ def console(context): @click.option('--junit-xml-output', help="Destination file path for junit xml report") @click.option('--failfast', is_flag=True, default=False) @pass_context -def run_tests(context, app=None, module=None, doctype=None, test=(), - driver=None, profile=False, coverage=False, junit_xml_output=False, ui_tests = False, - doctype_list_path=None, skip_test_records=False, skip_before_tests=False, failfast=False): +def run_tests(context, app=None, module=None, doctype=None, test=(), profile=False, + coverage=False, junit_xml_output=False, ui_tests = False, doctype_list_path=None, + skip_test_records=False, skip_before_tests=False, failfast=False): "Run tests" import frappe.test_runner @@ -535,8 +534,8 @@ def run_tests(context, app=None, module=None, doctype=None, test=(), cov.start() ret = frappe.test_runner.main(app, module, doctype, context.verbose, tests=tests, - force=context.force, profile=profile, junit_xml_output=junit_xml_output, - ui_tests=ui_tests, doctype_list_path=doctype_list_path, failfast=failfast) + force=context.force, profile=profile, junit_xml_output=junit_xml_output, + ui_tests=ui_tests, doctype_list_path=doctype_list_path, failfast=failfast) if coverage: cov.stop() From 7d1e04fac3569653fcdb3cb99720bda3ad0728b8 Mon Sep 17 00:00:00 2001 From: Prssanna Desai Date: Mon, 15 Mar 2021 10:39:25 +0530 Subject: [PATCH 15/18] fix: use single statememt Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> --- frappe/www/login.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/www/login.html b/frappe/www/login.html index deafc2015c..338e572309 100644 --- a/frappe/www/login.html +++ b/frappe/www/login.html @@ -88,7 +88,7 @@ {% if provider.icon %} {{ provider.icon }} {% endif %} - {{ _("Login With") }} {{ provider.provider_name }} + {{ _("Login With {0}").format(provider.provider_name) }} {% endfor %} From ac0d6243f3bcd6bbc1f05427b96f4dec22b057b8 Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Mon, 15 Mar 2021 11:03:37 +0530 Subject: [PATCH 16/18] fix: Hide tooltip on route change (#12579) --- frappe/public/js/frappe/desk.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frappe/public/js/frappe/desk.js b/frappe/public/js/frappe/desk.js index d59bd4cdb7..250d308b7e 100644 --- a/frappe/public/js/frappe/desk.js +++ b/frappe/public/js/frappe/desk.js @@ -173,6 +173,9 @@ frappe.Application = Class.extend({ frappe.router.route(); } frappe.after_ajax(() => frappe.flags.setting_original_route = false); + frappe.router.on('change', () => { + $(".tooltip").hide(); + }); }, setup_frappe_vue() { From 21b7fe4ee76930bfc6be84a2c5fa29349ca11335 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Mon, 15 Mar 2021 12:06:37 +0530 Subject: [PATCH 17/18] fix: jquery selector for get_inner_group_button() --- frappe/public/js/frappe/ui/page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/ui/page.js b/frappe/public/js/frappe/ui/page.js index 705d1ac8cd..96e31c7d62 100644 --- a/frappe/public/js/frappe/ui/page.js +++ b/frappe/public/js/frappe/ui/page.js @@ -537,7 +537,7 @@ frappe.ui.Page = Class.extend({ }, get_inner_group_button: function(label) { - return this.inner_toolbar.find(`.inner-group-button[data-label="${encodeURIComponent(label)}"`); + return this.inner_toolbar.find(`.inner-group-button[data-label="${encodeURIComponent(label)}"]`); }, set_inner_btn_group_as_primary: function(label) { From 71bb522e9556c85194a07d088969d7e364918da7 Mon Sep 17 00:00:00 2001 From: Shariq Ansari <30859809+shariquerik@users.noreply.github.com> Date: Tue, 16 Mar 2021 10:07:23 +0530 Subject: [PATCH 18/18] fix: Multi currency in print view shows same currency symbol (#12569) Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> --- frappe/model/base_document.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frappe/model/base_document.py b/frappe/model/base_document.py index c1e5f01e03..de0c1e0e1c 100644 --- a/frappe/model/base_document.py +++ b/frappe/model/base_document.py @@ -856,6 +856,11 @@ class BaseDocument(object): from frappe.model.meta import get_default_df df = get_default_df(fieldname) + if not currency: + currency = self.get(df.get("options")) + if not frappe.db.exists('Currency', currency, cache=True): + currency = None + val = self.get(fieldname) if translated: