create manufacturing activity type via patch only if setup completed

This commit is contained in:
Nabin Hait 2015-03-23 17:05:19 +05:30
parent f2eed445e5
commit e9d83303d3

View File

@ -4,7 +4,7 @@
import frappe
def execute():
if not frappe.db.exists('Activity Type','Manufacturing'):
if not frappe.db.exists('Activity Type','Manufacturing') and frappe.get_all("Company"):
frappe.get_doc({
"doctype": "Activity Type",
"activity_type": "Manufacturing"