mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
[fix] [minor] quotation to sales order, if not able to create customer, show message
This commit is contained in:
@@ -40,8 +40,7 @@ class DocType(TransactionBase):
|
|||||||
|
|
||||||
def validate_values(self):
|
def validate_values(self):
|
||||||
if webnotes.defaults.get_global_default('cust_master_name') == 'Naming Series' and not self.doc.naming_series:
|
if webnotes.defaults.get_global_default('cust_master_name') == 'Naming Series' and not self.doc.naming_series:
|
||||||
msgprint("Series is Mandatory.")
|
webnotes.throw("Series is Mandatory.", webnotes.MandatoryError)
|
||||||
raise Exception
|
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.validate_values()
|
self.validate_values()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import webnotes
|
|||||||
from webnotes.utils import cstr, getdate
|
from webnotes.utils import cstr, getdate
|
||||||
from webnotes.model.bean import getlist
|
from webnotes.model.bean import getlist
|
||||||
from webnotes.model.code import get_obj
|
from webnotes.model.code import get_obj
|
||||||
from webnotes import msgprint
|
from webnotes import _, msgprint
|
||||||
|
|
||||||
sql = webnotes.conn.sql
|
sql = webnotes.conn.sql
|
||||||
|
|
||||||
@@ -276,5 +276,8 @@ def _make_customer(source_name, ignore_permissions=False):
|
|||||||
customer.doc.name += "-" + lead_name
|
customer.doc.name += "-" + lead_name
|
||||||
customer.insert()
|
customer.insert()
|
||||||
return customer
|
return customer
|
||||||
|
elif webnotes.MandatoryError:
|
||||||
|
msgprint(_("You will need to make Customer from Lead") + (" - %s" % lead_name))
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
raise e
|
raise e
|
||||||
|
|||||||
Reference in New Issue
Block a user