Fix linked item auto-population in Medication form#1005
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR updates the Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Issue:
Selecting an existing Item in the linked_items child table of the Medication form did not auto-populate dependent fields like item_group, brand, manufacturer, description.
PR description:
This change fixes the Medication Linked Item child table so selecting an Item correctly pulls related values from the linked Item master.
Changes made:
Added fetch_from for item_group
Added fetch_from for brand
Added fetch_from for manufacturer ( will be fetched if the manufacturer is added in the item manufacturer form and set it as default)
Added fetch_from for description
The child table fields were missing fetch_from mappings, so Frappe had no field-level instructions to copy values from the selected Item. With these mappings in place, the form now auto-fills the expected details when an item is selected.