fix: whitelist all query functions for search widget

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
Chinmay D. Pai
2020-07-07 16:46:04 +05:30
parent b9e4df557b
commit 75c2e28788
20 changed files with 47 additions and 11 deletions

View File

@@ -223,6 +223,7 @@ def get_benefit_amount_based_on_pro_rata(sal_struct, component_max_benefit):
return benefit_amount
@frappe.whitelist()
def get_earning_components(doctype, txt, searchfield, start, page_len, filters):
if len(filters) < 2:
return {}
@@ -238,4 +239,4 @@ def get_earning_components(doctype, txt, searchfield, start, page_len, filters):
""", salary_structure)
else:
frappe.throw(_("Salary Structure not found for employee {0} and date {1}")
.format(filters['employee'], filters['date']))
.format(filters['employee'], filters['date']))

View File

@@ -573,6 +573,7 @@ def submit_salary_slips_for_employees(payroll_entry, salary_slips, publish_progr
if not_submitted_ss:
frappe.msgprint(_("Could not submit some Salary Slips"))
@frappe.whitelist()
def get_payroll_entries_for_jv(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""
select name from `tabPayroll Entry`