When you create a Material Request directly on the Sales Order via → Create → Material Request, Delivery Date on Sales Order Item is not transferred to Material Request Item Required By date.
Any ideas?
When you create a Material Request directly on the Sales Order via → Create → Material Request, Delivery Date on Sales Order Item is not transferred to Material Request Item Required By date.
Any ideas?
Sales Order Item field for Delivery Date is delivery_date and Material Request Item field for such a mapping is schedule_date.
Since these 2 field names do not match, sales_order.py block starting at line #873 fails:
"Sales Order Item": {
"doctype": "Material Request Item",
"field_map": {"name": "sales_order_item", "parent": "sales_order"},
"condition": lambda item: not frappe.db.exists(
"Product Bundle", {"name": item.item_code, "disabled": 0}
)
and get_remaining_qty(item) > 0,
"postprocess": update_item,
},
I think we can resolve this by remaning one of these fields on either Material Request Item or Sales Order Item.
What do you think?
I guess, since less code is dependent on the earlier stage of the process, that is the Sales Order Item, would be a good candidate.
"field_map": {"name": "sales_order_item", "parent": "sales_order"},
I guess the above line #875 needs to include:
"delivery_date":"required_by"