Fixed NameError handling
This commit is contained in:
parent
b054eb7a4f
commit
f50a65294f
@ -28,7 +28,7 @@
|
|||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "naming_series",
|
"oldfieldname": "naming_series",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "BILL\nBILLJ",
|
"options": "BILL",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
|
@ -66,7 +66,7 @@ class Customer(TransactionBase):
|
|||||||
c.is_primary_contact = 1
|
c.is_primary_contact = 1
|
||||||
try:
|
try:
|
||||||
c.save()
|
c.save()
|
||||||
except NameError:
|
except frappe.NameError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
|
@ -151,7 +151,7 @@ def _make_customer(source_name, ignore_permissions=False):
|
|||||||
try:
|
try:
|
||||||
customer.insert()
|
customer.insert()
|
||||||
return customer
|
return customer
|
||||||
except NameError:
|
except frappe.NameError:
|
||||||
if frappe.defaults.get_global_default('cust_master_name') == "Customer Name":
|
if frappe.defaults.get_global_default('cust_master_name') == "Customer Name":
|
||||||
customer.run_method("autoname")
|
customer.run_method("autoname")
|
||||||
customer.name += "-" + lead_name
|
customer.name += "-" + lead_name
|
||||||
|
@ -15,7 +15,7 @@ def install(company):
|
|||||||
for d in docs:
|
for d in docs:
|
||||||
try:
|
try:
|
||||||
frappe.get_doc(d).insert()
|
frappe.get_doc(d).insert()
|
||||||
except NameError:
|
except frappe.NameError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user