- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
- # License: MIT. See LICENSE
- import json
-
- import frappe
- from frappe import _
- from frappe.model import child_table_fields, default_fields, table_fields
- from frappe.utils import cstr
-
-
- @frappe.whitelist()
- def make_mapped_doc(method, source_name, selected_children=None, args=None):
- """Returns the mapped document calling the given mapper method.
- Sets selected_children as flags for the `get_mapped_doc` method.
-
- Called from `open_mapped_doc` from create_new.js"""
-
- for hook in frappe.get_hooks("override_whitelisted_methods", {}).get(method, []):
- # override using the first hook
- method = hook