From 09dd01c35353e71b6a0de2077ff46752c61edeff Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 28 Jul 2016 18:54:50 +0530 Subject: [PATCH 1/5] [fix] Remove reports on uninstallation of apps --- frappe/installer.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frappe/installer.py b/frappe/installer.py index 68bffabfb4..32b16db3ac 100755 --- a/frappe/installer.py +++ b/frappe/installer.py @@ -188,6 +188,12 @@ def remove_app(app_name, dry_run=False): if not doctype.issingle: drop_doctypes.append(doctype.name) + + # remove reports + for report in frappe.get_list("Report", filters={"module": module_name}): + print "removing {0}...".format(report.name) + if not dry_run: + frappe.delete_doc("Report", report.name) print "removing Module {0}...".format(module_name) if not dry_run: From 74aab8dcb437ec647130eb929b83c54832aa21a3 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Sat, 30 Jul 2016 15:49:59 +0530 Subject: [PATCH 2/5] Reload Role doctype --- frappe/patches.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/frappe/patches.txt b/frappe/patches.txt index 3af018acd8..bb38ebae50 100644 --- a/frappe/patches.txt +++ b/frappe/patches.txt @@ -4,6 +4,7 @@ frappe.patches.v6_1.rename_file_data execute:frappe.reload_doc('core', 'doctype', 'doctype', force=True) #2016-07-11 execute:frappe.reload_doc('core', 'doctype', 'docfield', force=True) #2016-02-26 execute:frappe.reload_doc('core', 'doctype', 'docperm') #2014-06-24 +execute:frappe.reload_doc('core', 'doctype', 'role') execute:frappe.reload_doc('custom', 'doctype', 'custom_field') #2015-10-19 execute:frappe.reload_doc('core', 'doctype', 'page') #2013-13-26 execute:frappe.reload_doc('core', 'doctype', 'report') #2014-06-03 From a13ece3e540f31db9238dc71047cad0da14d23f2 Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Sat, 30 Jul 2016 21:01:35 +0530 Subject: [PATCH 3/5] URL change v7 frappe.templates.pages.login is now frappe.www.login --- .../en/guides/deployment/how-to-enable-social-logins.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frappe/docs/user/en/guides/deployment/how-to-enable-social-logins.md b/frappe/docs/user/en/guides/deployment/how-to-enable-social-logins.md index ab9afa39cc..4a58a4c551 100755 --- a/frappe/docs/user/en/guides/deployment/how-to-enable-social-logins.md +++ b/frappe/docs/user/en/guides/deployment/how-to-enable-social-logins.md @@ -20,7 +20,7 @@ To enable these signups, you need to have **Client ID** and **Client Secret** fr 1. Click on Apps (topbar) > New App, fill in the form. 1. Go to Settings > Basic, set the **Contact Email** and save the changes. 1. Go to Settings > Advanced, find the field **Valid OAuth redirect URIs**, and enter: - **http://{{ yoursite }}/api/method/frappe.templates.pages.login.login\_via\_facebook** + **http://{{ yoursite }}/api/method/frappe.www.login.login\_via\_facebook** 1. Save the changes in Advance tab. 1. Go to Status & Review and switch on "Do you want to make this app and all its live features available to the general public?" 1. Go to Dashboard, click on the show button besides App Secret, and copy the App ID and App Secret into **Desktop > Website > Setup > Social Login Keys** @@ -40,7 +40,7 @@ To enable these signups, you need to have **Client ID** and **Client Secret** fr - Web Application - Authorized JavaScript origins as **http://{{ yoursite }}** - Authorized redirect URI as - **http://{{ yoursite }}/api/method/frappe.templates.pages.login.login\_via\_google** + **http://{{ yoursite }}/api/method/frappe.www.login.login\_via\_google** 1. Go to the section **Client ID for web application** and copy the Client ID and Client Secret into **Desktop > Website > Setup > Social Login Keys**
@@ -56,7 +56,7 @@ To enable these signups, you need to have **Client ID** and **Client Secret** fr 1. Fill the form with: - Homepage URL as **http://{{ yoursite }}** - Authorization callback URL as - **http://{{ yoursite }}/api/method/frappe.templates.pages.login.login\_via\_github** + **http://{{ yoursite }}/api/method/frappe.www.login.login\_via\_github** 1. Click on Register application. 1. Copy the generated Client ID and Client Secret into **Desktop > Website > Setup > Social Login Keys** @@ -64,4 +64,4 @@ To enable these signups, you need to have **Client ID** and **Client Secret** fr
- \ No newline at end of file + From b3e3ec7b863e26a3bcad6826da5ebbc63003026c Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 1 Aug 2016 12:15:55 +0530 Subject: [PATCH 4/5] [minor] fix for rename_doc --- frappe/model/rename_doc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frappe/model/rename_doc.py b/frappe/model/rename_doc.py index a3bf6f6963..49d792f0fb 100644 --- a/frappe/model/rename_doc.py +++ b/frappe/model/rename_doc.py @@ -89,12 +89,16 @@ def rename_parent_and_child(doctype, old, new, meta): def validate_rename(doctype, new, meta, merge, force, ignore_permissions): # using for update so that it gets locked and someone else cannot edit it while this rename is going on! - exists = frappe.db.sql("select name from `tab{doctype}` where name=%s COLLATE utf8mb4_unicode_ci for update".format(doctype=frappe.db.escape(doctype)), new) + exists = frappe.db.sql("select name from `tab{doctype}` where name=%s for update".format(doctype=frappe.db.escape(doctype)), new) exists = exists[0][0] if exists else None if merge and not exists: frappe.msgprint(_("{0} {1} does not exist, select a new target to merge").format(doctype, new), raise_exception=1) + if exists and exists != new: + # for fixing case, accents + exists = None + if (not merge) and exists: frappe.msgprint(_("Another {0} with name {1} exists, select another name").format(doctype, new), raise_exception=1) From 2168ff9b5216506e2672b4a81d3ca4c73a4fc7a3 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 1 Aug 2016 14:42:07 +0600 Subject: [PATCH 5/5] bumped to version 7.0.11 --- frappe/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/__init__.py b/frappe/__init__.py index 68ca5acca7..015efa3cf8 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -13,7 +13,7 @@ import os, sys, importlib, inspect, json from .exceptions import * from .utils.jinja import get_jenv, get_template, render_template -__version__ = "7.0.10" +__version__ = "7.0.11" local = Local()