Merge pull request #14740 from manassolanki/fix-20
[minor] fix for the args in the frm.call
This commit is contained in:
commit
3ff7f79cc7
@ -186,7 +186,7 @@ cur_frm.cscript['Declare Order Lost'] = function(){
|
|||||||
return cur_frm.call({
|
return cur_frm.call({
|
||||||
method: "declare_order_lost",
|
method: "declare_order_lost",
|
||||||
doc: cur_frm.doc,
|
doc: cur_frm.doc,
|
||||||
args: args.reason,
|
args: args,
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(r.exc) {
|
if(r.exc) {
|
||||||
frappe.msgprint(__("There were errors."));
|
frappe.msgprint(__("There were errors."));
|
||||||
|
@ -70,10 +70,10 @@ class Quotation(SellingController):
|
|||||||
opp.status = None
|
opp.status = None
|
||||||
opp.set_status(update=True)
|
opp.set_status(update=True)
|
||||||
|
|
||||||
def declare_order_lost(self, arg):
|
def declare_order_lost(self, reason):
|
||||||
if not self.has_sales_order():
|
if not self.has_sales_order():
|
||||||
frappe.db.set(self, 'status', 'Lost')
|
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_opportunity()
|
||||||
self.update_lead()
|
self.update_lead()
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user