blob: 1bd3357a81b722e8ad646ceb14558573295cf920 [file] [log] [blame]
Nabin Hait0357fbc2018-03-09 13:19:52 +05301# 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()
Nabin Haita334ed82019-01-22 10:41:50 +053010 if region in ["Nepal", "France"] and doc.docstatus != 0:
11 frappe.throw(_("Deletion is not permitted for country {0}".format(region)))