Create price list only if setup complete

This commit is contained in:
Anand Doshi 2014-06-13 15:30:38 +05:30
parent 5002a6467d
commit 3dc722b096

View File

@ -7,6 +7,10 @@ from frappe import _
from frappe.utils.nestedset import get_root_of
def execute():
# setup not complete
if not frappe.db.sql("""select name from tabCompany limit 1"""):
return
if not frappe.db.sql("select name from `tabPrice List` where buying=1"):
create_price_list(_("Standard Buying"), buying=1)