From 250e9642056e5a321371da8488a6f2673b0bff61 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 2 Aug 2017 18:23:39 +0530 Subject: [PATCH] Set write permission to sales manger for permlevel 1 in Quotation doctype --- erpnext/patches.txt | 3 ++- ...rite_permission_for_quotation_for_sales_manager.py | 11 +++++++++++ erpnext/selling/doctype/quotation/quotation.json | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 erpnext/patches/v8_6/set_write_permission_for_quotation_for_sales_manager.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 2923d6dc9d..ad351d1bfe 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -425,4 +425,5 @@ erpnext.patches.v8_3.update_company_total_sales erpnext.patches.v8_1.set_delivery_date_in_so_item #2017-07-28 erpnext.patches.v8_5.fix_tax_breakup_for_non_invoice_docs erpnext.patches.v8_5.update_customer_group_in_POS_profile -erpnext.patches.v8_6.update_timesheet_company_from_PO \ No newline at end of file +erpnext.patches.v8_6.update_timesheet_company_from_PO +erpnext.patches.v8_6.set_write_permission_for_quotation_for_sales_manager \ No newline at end of file diff --git a/erpnext/patches/v8_6/set_write_permission_for_quotation_for_sales_manager.py b/erpnext/patches/v8_6/set_write_permission_for_quotation_for_sales_manager.py new file mode 100644 index 0000000000..0b0fde3409 --- /dev/null +++ b/erpnext/patches/v8_6/set_write_permission_for_quotation_for_sales_manager.py @@ -0,0 +1,11 @@ +# Copyright (c) 2017, Frappe and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + # Set write permission to permlevel 1 for sales manager role in Quotation doctype + frappe.db.sql(""" update `tabCustom Docperm` set `tabCustom Docperm`.write = 1 + where `tabCustom Docperm`.parent = 'Quotation' and `tabCustom Docperm`.role = 'Sales Manager' + and `tabCustom Docperm`.permlevel = 1 """) \ No newline at end of file diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index 21090230dd..313041352a 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -2572,7 +2572,7 @@ "istable": 0, "max_attachments": 1, "menu_index": 0, - "modified": "2017-07-19 13:49:33.388736", + "modified": "2017-08-02 18:15:38.198698", "modified_by": "Administrator", "module": "Selling", "name": "Quotation", @@ -2638,7 +2638,7 @@ "set_user_permissions": 0, "share": 0, "submit": 0, - "write": 0 + "write": 1 }, { "amend": 1,