I have created a doctype in an app where I can save different item description based on language code, which I have added on the Item doctype as a child table. When creating a quote, I am trying to update the item’s description with the one I fetched from my doctype, but it does not work. I can update other fields with my description and it works perfectly, only the description does not want to update…
Here is my custom script:
frappe.ui.form.on(“Quotation Item”, “item_code”, function(frm, cdt, cdn) {
ct = locals[cdt][cdn]
frappe.call({
method: “shei.get_description.fetch_item_description”,
args:{
customer_code: frm.doc.customer,
item_code: ct.item_code,
},
callback: function(r) {
frappe.model.set_value(cdt, cdn, “description”, r.message);
}
})
});
If I do a “msgprint(ct.description);”, I get the correct description, but it never actually shows on the form.
Any help would be greatly appreciated!
Thank you
Bernard