Address of selected warehouse not getting fetched

In Material request doctype i need to set the warehouse address when the source and target warehouse is selected. For that I have made a client script but it is not working.

frappe.ui.form.on('Material Request', {
    set_from_warehouse: function(frm) {
        if(frm.doc.set_from_warehouse) {
            frappe.db.get_value('Warehouse', frm.doc.set_from_warehouse, 'address_html', (r) => {
                if(r.address_html) {
                    frm.set_value('custom_source_warehouse_address', r.address_html);
                }
            });
        }
    }
});

How can I do it?

HTML fields are not stored in the database and hence you won’t be able to retrieve it. Although you can store the Address details in the Warehouse Contact Info section and fetch it from there.