Is it possible to trigger fetch_from assignation logic on a doctype instance without saving the doc ?
I have some custom field with a fetch_from defined, but it won’t show a value at screen until the document is saved.
I’d like some way to trigger a refresh of all fetch_from values on the document, prior to saving.
Here is the use case.
In Production Plan, Material Requirement Planning section, there is a button Get Raw Materials for Production that fill the Raw Materials grid below.
I want to show the Stock Uom in this grid, so I added a custom field into Material Request Plan Item doctype, with a fetch_from=“item_code.stock_uom”.
Now when I click button Get Raw Materials for Production, my custom field Stock Uom remains empty in the grid, only when saving the Production Plan it gets its value assigned.
I would prefer not issue a save automatically on click of button Get Raw Materials for Production, as it is not intuitive for a user that would just be trying different things and want to leave without saving.
So is there any way to trigger the fetch_from assignation ?