Merge pull request #38634 from creative-paramu/shipping_address_link
fix: Shipping Address Link Showing in Buying
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 8c0d84b..156c05b 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -471,7 +471,6 @@
item.pricing_rules = ''
return this.frm.call({
method: "erpnext.stock.get_item_details.get_item_details",
- child: item,
args: {
doc: me.frm.doc,
args: {
@@ -522,6 +521,19 @@
if(!r.exc) {
frappe.run_serially([
() => {
+ var child = locals[cdt][cdn];
+ var std_field_list = ["doctype"]
+ .concat(frappe.model.std_fields_list)
+ .concat(frappe.model.child_table_field_list);
+
+ for (var key in r.message) {
+ if (std_field_list.indexOf(key) === -1) {
+ if (key === "qty" && child[key]) continue;
+ child[key] = r.message[key];
+ }
+ }
+ },
+ () => {
var d = locals[cdt][cdn];
me.add_taxes_from_item_tax_template(d.item_tax_rate);
if (d.free_item_data && d.free_item_data.length > 0) {