chore: add module arg in create_dashboard_py_for_doctype

(cherry picked from commit 5816b15aed68a5f2062ad4d119425f7c10c6062c)
This commit is contained in:
anandbaburajan 2023-07-20 14:46:26 +05:30 committed by Mergify
parent 96a633eedd
commit 4010add64c
2 changed files with 4 additions and 2 deletions

View file

@ -54,6 +54,7 @@ context("Dashboard links", () => {
"frappe.tests.ui_test_helpers.create_dashboard_py_for_doctype",
{
name: doctype_a_with_child_table_with_link_to_doctype_b_name,
module: "custom",
dashboard:
doctype_a_with_child_table_with_link_to_doctype_b_dashboard,
}

View file

@ -321,11 +321,12 @@ def update_child_table(name, doctype_to_link_name=None, doctype_to_link_fieldnam
@whitelist_for_tests
def create_dashboard_py_for_doctype(name, dashboard):
def create_dashboard_py_for_doctype(name, module, dashboard):
scrubbed_name = scrub(name)
target_file = os.path.join(
frappe.get_pymodule_path("frappe"),
"custom/doctype",
module,
"doctype",
scrubbed_name,
scrubbed_name + "_dashboard.py",
)