mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-06 06:58:27 +00:00
15 lines
384 B
Python
15 lines
384 B
Python
# Copyright (c) 2018, Frappe Technologies and contributors
|
|
# For license information, please see license.txt
|
|
|
|
|
|
import frappe
|
|
from frappe import _
|
|
|
|
from erpnext import get_region
|
|
|
|
|
|
def check_deletion_permission(doc, method):
|
|
region = get_region(doc.company)
|
|
if region in ["Nepal"] and doc.docstatus != 0:
|
|
frappe.throw(_("Deletion is not permitted for country {0}").format(region))
|