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: |
| 13 | frappe.throw(_("Deletion is not permitted for country {0}".format(region))) |
| 14 | |
| 15 | # don't remove this function it is used in tests |
| 16 | def test_method(): |
| 17 | '''test function''' |
| 18 | return 'overridden' |