def make_sample_data():
 items = frappe.get_all(u'Item', {u'is_sales_item': 1})
 customers = frappe.get_all(u'Customer')
 warehouses = frappe.get_all(u'Warehouse')
 if (items and customers):
  for i in range(3):
   customer = random.choice(customers).name
   make_opportunity(items, customer)
   make_quote(items, customer)
 make_projects()
 if (items and warehouses):
  make_material_request(frappe.get_all(u'Item'))
 frappe.db.commit()

def make_sample_data ( ) : items = frappe . get_all ( u'Item' , { u'is_sales_item' : 1 } ) customers = frappe . get_all ( u'Customer' ) warehouses = frappe . get_all ( u'Warehouse' ) if ( items and customers ) : for i in range ( 3 ) : customer = random . choice ( customers ) . name make_opportunity ( items , customer ) make_quote ( items , customer ) make_projects ( ) if ( items and warehouses ) : make_material_request ( frappe . get_all ( u'Item' ) ) frappe . db . commit ( )
create a few opportunities .