theopen-institute | 38cbd71 | 2018-03-09 07:42:05 +0700 | [diff] [blame] | 1 | # Copyright (c) 2018, Frappe Technologies and contributors |
2 | # For license information, please see license.txt | ||||
3 | |||||
4 | import frappe | ||||
5 | from frappe import _ | ||||
6 | from erpnext import get_region | ||||
7 | |||||
8 | def check_deletion_permission(doc, method): | ||||
9 | region = get_region() | ||||
10 | if region not in ["Nepal"]: | ||||
11 | return | ||||
12 | else: | ||||
Nabin Hait | 096c05c | 2018-03-09 13:11:00 +0530 | [diff] [blame] | 13 | frappe.throw(_("Deletion is not permitted for country {0}".format(region))) |