Fixes for regional feature of Nepal
This commit is contained in:
parent
38cbd71352
commit
096c05ca6f
@ -750,7 +750,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-01-19 15:25:43.166877",
|
"modified": "2018-03-09 15:25:43.166877",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Healthcare",
|
"module": "Healthcare",
|
||||||
"name": "Physician",
|
"name": "Physician",
|
||||||
|
@ -4,6 +4,7 @@ def execute():
|
|||||||
if frappe.db.exists("DocType", "Physician"):
|
if frappe.db.exists("DocType", "Physician"):
|
||||||
frappe.reload_doc("healthcare", "doctype", "physician")
|
frappe.reload_doc("healthcare", "doctype", "physician")
|
||||||
frappe.reload_doc("healthcare", "doctype", "physician_service_unit_schedule")
|
frappe.reload_doc("healthcare", "doctype", "physician_service_unit_schedule")
|
||||||
|
|
||||||
if frappe.db.has_column('Physician', 'physician_schedule'):
|
if frappe.db.has_column('Physician', 'physician_schedule'):
|
||||||
for doc in frappe.get_all('Physician'):
|
for doc in frappe.get_all('Physician'):
|
||||||
_doc = frappe.get_doc('Physician', doc.name)
|
_doc = frappe.get_doc('Physician', doc.name)
|
||||||
|
@ -11,8 +11,3 @@ def check_deletion_permission(doc, method):
|
|||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
frappe.throw(_("Deletion is not permitted for country {0}".format(region)))
|
frappe.throw(_("Deletion is not permitted for country {0}".format(region)))
|
||||||
|
|
||||||
# don't remove this function it is used in tests
|
|
||||||
def test_method():
|
|
||||||
'''test function'''
|
|
||||||
return 'overridden'
|
|
||||||
|
@ -9,11 +9,8 @@ class TestInit(unittest.TestCase):
|
|||||||
frappe.flags.country = 'India'
|
frappe.flags.country = 'India'
|
||||||
self.assertEqual(test_method(), 'overridden')
|
self.assertEqual(test_method(), 'overridden')
|
||||||
|
|
||||||
frappe.flags.country = 'Nepal'
|
frappe.flags.country = 'Maldives'
|
||||||
self.assertEqual(test_method(), 'overridden')
|
self.assertEqual(test_method(), 'original')
|
||||||
|
|
||||||
frappe.flags.country = 'France'
|
frappe.flags.country = 'France'
|
||||||
self.assertEqual(test_method(), 'overridden')
|
self.assertEqual(test_method(), 'overridden')
|
||||||
|
|
||||||
frappe.flags.country = 'Maldives'
|
|
||||||
self.assertEqual(test_method(), 'original')
|
|
Loading…
x
Reference in New Issue
Block a user