blob: 66536ee7623d78b2806a14f9a7d06ab88fd73471 [file] [log] [blame]
theopen-institute38cbd712018-03-09 07:42:05 +07001# Copyright (c) 2018, Frappe Technologies and contributors
2# For license information, please see license.txt
3
4import frappe
5from frappe import _
6from erpnext import get_region
7
8def check_deletion_permission(doc, method):
9 region = get_region()
10 if region not in ["Nepal"]:
11 return
12 else:
13 frappe.throw(_("Deletion is not permitted for country {0}".format(region)))
14
15# don't remove this function it is used in tests
16def test_method():
17 '''test function'''
18 return 'overridden'