diff --git a/hr/doctype/leave_application/leave_application.py b/hr/doctype/leave_application/leave_application.py index cfd6f701c5..33bb51655f 100755 --- a/hr/doctype/leave_application/leave_application.py +++ b/hr/doctype/leave_application/leave_application.py @@ -39,7 +39,7 @@ class DocType: self.validate_balance_leaves() self.validate_leave_overlap() self.validate_max_days() - #self.validate_block_days() + self.validate_block_days() def on_submit(self): if self.doc.status != "Approved": diff --git a/hr/doctype/leave_type/leave_type.py b/hr/doctype/leave_type/leave_type.py index 7f48feb2eb..5b2e5e8827 100644 --- a/hr/doctype/leave_type/leave_type.py +++ b/hr/doctype/leave_type/leave_type.py @@ -19,4 +19,11 @@ import webnotes class DocType: def __init__(self, d, dl): - self.doc, self.doclist = d, dl \ No newline at end of file + self.doc, self.doclist = d, dl + +test_records = [ + [{ + "leave_type_name": "_Test Leave Type", + "doctype": "Leave Type" + }] +] \ No newline at end of file diff --git a/setup/doctype/company/company.py b/setup/doctype/company/company.py index e1919a5fe2..b36253ed39 100644 --- a/setup/doctype/company/company.py +++ b/setup/doctype/company/company.py @@ -165,8 +165,6 @@ class DocType: ac_obj.validate() ac_obj.doc.save(1) ac_obj.on_update() - sql("commit") - sql("start transaction") # Set letter head @@ -257,3 +255,12 @@ class DocType: sql("update `tabSingles` set value = %s where doctype='Global Defaults' and field = 'default_company' and value = %s", (newdn, olddn)) if get_defaults('company') == olddn: set_default('company', newdn) + +test_records = [ + [{ + "company_name": "_Test Company", + "abbr": "TC", + "default_currency": "INR", + "doctype": "Company" + }] +] \ No newline at end of file diff --git a/setup/doctype/currency/currency.py b/setup/doctype/currency/currency.py index 7f48feb2eb..008175eea7 100644 --- a/setup/doctype/currency/currency.py +++ b/setup/doctype/currency/currency.py @@ -19,4 +19,7 @@ import webnotes class DocType: def __init__(self, d, dl): - self.doc, self.doclist = d, dl \ No newline at end of file + self.doc, self.doclist = d, dl + +# already set +test_records = [] \ No newline at end of file