fix: Use get_all instead of get_list for child doctype (#28538)

* fix(Student Attendance Tool): Use `get_all` instead of `get_list` for child doctype

* fix(Course Schedule): incorrect fetch from value

* fix: sider

* fix(Gratuity): Use `get_all` instead of `get_list` for child doctype
This commit is contained in:
Rucha Mahabal
2021-11-26 13:24:32 +05:30
committed by GitHub
parent 2a5f663a1e
commit ca8dec0cf2
5 changed files with 67 additions and 432 deletions

View File

@@ -193,7 +193,7 @@ def get_total_applicable_component_amount(employee, applicable_earnings_componen
sal_slip = get_last_salary_slip(employee)
if not sal_slip:
frappe.throw(_("No Salary Slip is found for Employee: {0}").format(bold(employee)))
component_and_amounts = frappe.get_list("Salary Detail",
component_and_amounts = frappe.get_all("Salary Detail",
filters={
"docstatus": 1,
'parent': sal_slip,

View File

@@ -48,7 +48,7 @@ class TestGratuity(unittest.TestCase):
self.assertEqual(floor(experience), gratuity.current_work_experience)
#amount Calculation
component_amount = frappe.get_list("Salary Detail",
component_amount = frappe.get_all("Salary Detail",
filters={
"docstatus": 1,
'parent': sal_slip,
@@ -84,7 +84,7 @@ class TestGratuity(unittest.TestCase):
self.assertEqual(floor(experience), gratuity.current_work_experience)
#amount Calculation
component_amount = frappe.get_list("Salary Detail",
component_amount = frappe.get_all("Salary Detail",
filters={
"docstatus": 1,
'parent': sal_slip,