From 89e7f8b3870630dc817ff2ae1d3130f04823d865 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Thu, 28 Jun 2018 20:37:03 +0530 Subject: [PATCH] [minor] fix for the args in the frm.call --- erpnext/selling/doctype/quotation/quotation.js | 2 +- erpnext/selling/doctype/quotation/quotation.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index 081d4dbe9a..695a410f15 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -186,7 +186,7 @@ cur_frm.cscript['Declare Order Lost'] = function(){ return cur_frm.call({ method: "declare_order_lost", doc: cur_frm.doc, - args: args.reason, + args: args, callback: function(r) { if(r.exc) { frappe.msgprint(__("There were errors.")); diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 6d9c170aef..694b53065d 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -70,10 +70,10 @@ class Quotation(SellingController): opp.status = None opp.set_status(update=True) - def declare_order_lost(self, arg): + def declare_order_lost(self, reason): if not self.has_sales_order(): frappe.db.set(self, 'status', 'Lost') - frappe.db.set(self, 'order_lost_reason', arg) + frappe.db.set(self, 'order_lost_reason', reason) self.update_opportunity() self.update_lead() else: