2015-03-03 14:55:30 +05:30
|
|
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
2013-12-27 17:30:24 +05:30
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
|
|
|
from __future__ import unicode_literals
|
2014-02-14 15:47:51 +05:30
|
|
|
import frappe
|
2014-05-28 18:49:13 +05:30
|
|
|
import frappe.permissions
|
2013-12-27 17:30:24 +05:30
|
|
|
|
|
|
|
def execute():
|
2014-03-11 16:15:05 +05:30
|
|
|
for warehouse, user in frappe.db.sql("""select parent, user from `tabWarehouse User`"""):
|
2014-05-28 18:49:13 +05:30
|
|
|
frappe.permissions.add_user_permission("Warehouse", warehouse, user)
|
|
|
|
|
|
|
|
frappe.delete_doc_if_exists("DocType", "Warehouse User")
|
|
|
|
frappe.reload_doc("stock", "doctype", "warehouse")
|