A have a Custom DocType name
GoodsSummary with a Field:Link to Purchase Order. For this I need to map (or pre-populate) a child table named
BookItems (items with Purchase Receipt) and another one ‘UnBookItems’ (items without Purchase Receipt) onchange of Purchase Order:Link:Field.
I have seen the same functionality to Purchase Receipt with the button ‘Get Items’ form Purchase Order. In the source code I see a
erpnext.utils.map_current_doc that calls
erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_receipt and inside there i see
from frappe.model.mapper import get_mapped_doc (frappe/mapper.py at develop · frappe/frappe · GitHub)
Basically I need to create something similar I can’t understand from
get_mapped_doc function the table_maps argument how it should be structured.
For example I see in
I see some
condition or even
May I have some explanation about the
get_mapper_doc or a simplified usage example?