patch fixes

This commit is contained in:
Nabin Hait 2015-03-25 15:55:09 +05:30
parent 06b0b36ae6
commit d25fda7537
3 changed files with 6 additions and 10 deletions

View File

@ -107,7 +107,6 @@ erpnext.patches.v4_2.update_landed_cost_voucher
erpnext.patches.v4_2.set_item_has_batch
erpnext.patches.v4_2.update_stock_uom_for_dn_in_sle
erpnext.patches.v5_0.recalculate_total_amount_in_jv
erpnext.patches.v5_0.remove_shopping_cart_app
erpnext.patches.v5_0.update_companywise_payment_account
erpnext.patches.v5_0.remove_birthday_events
erpnext.patches.v5_0.update_item_name_in_bom

View File

@ -5,7 +5,6 @@ import frappe
import frappe.permissions
def execute():
frappe.reload_doc("core", "doctype", "block_module")
frappe.reload_doctype("User")
frappe.reload_doctype("Lead")
frappe.reload_doctype("Contact")
@ -22,7 +21,12 @@ def execute():
for userrole in frappe.get_all("UserRole", "parent", {"role": "Sales Manager"}):
if frappe.db.exists("User", userrole.parent):
user = frappe.get_doc("User", userrole.parent)
user.add_roles("Newsletter Manager")
user.append("user_roles", {
"doctype": "UserRole",
"role": "Newsletter Manager"
})
user.flags.ignore_mandatory = True
user.save()
# create default lists
general = frappe.new_doc("Newsletter List")

View File

@ -1,7 +0,0 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
def execute():
from frappe.installer import remove_from_installed_apps
remove_from_installed_apps("shopping_cart")