From 80166e26cc480369871014f8e3a401b3febe87d3 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 17 Jul 2013 14:49:13 +0530 Subject: [PATCH] [minor] [selling/buying] use script_manager.trigger instead of calling cscript function directly post item details fetch, so that custom code can be executed --- buying/doctype/purchase_common/purchase_common.js | 2 +- selling/doctype/sales_common/sales_common.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buying/doctype/purchase_common/purchase_common.js b/buying/doctype/purchase_common/purchase_common.js index e93d34ed73..e54319dd05 100644 --- a/buying/doctype/purchase_common/purchase_common.js +++ b/buying/doctype/purchase_common/purchase_common.js @@ -129,7 +129,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ }, callback: function(r) { if(!r.exc) { - me.import_ref_rate(me.frm.doc, cdt, cdn); + me.frm.script_manager.trigger("import_ref_rate", cdt, cdn); } } }); diff --git a/selling/doctype/sales_common/sales_common.js b/selling/doctype/sales_common/sales_common.js index 9c11eeab7e..a0ba0dfd3e 100644 --- a/selling/doctype/sales_common/sales_common.js +++ b/selling/doctype/sales_common/sales_common.js @@ -202,7 +202,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ }, callback: function(r) { if(!r.exc) { - me.ref_rate(me.frm.doc, cdt, cdn); + me.frm.script_manager.trigger("ref_rate", cdt, cdn); } } });