User Progress (#10336)

* [user-progress] first cut

* [user-progress] Add users slide, remove taxes, make sample data

* wip tests

* [setup-wiz] UI test

* [user-progress] notif test, docs trim

* wip

* [user-progress] Setup Progress single to update action states, fixtures

* setup progress actions patch

* rename sales_target field patch

* [progress] wip reform slide data

* [progress] remove slide data

* [setup] add roles for GST doctypes, remove commit from fixtures
This commit is contained in:
Prateeksha Singh
2017-09-04 11:14:04 +05:30
committed by Rushabh Mehta
parent fd39d6bd3c
commit 95d8fd38f5
42 changed files with 1361 additions and 792 deletions

View File

@@ -10,26 +10,27 @@ import random, os, json
from frappe import _
from markdown2 import markdown
def make_sample_data(args):
def make_sample_data(domain, make_dependent = False):
"""Create a few opportunities, quotes, material requests, issues, todos, projects
to help the user get started"""
items = frappe.get_all("Item", {'is_sales_item': 1})
customers = frappe.get_all("Customer")
warehouses = frappe.get_all("Warehouse")
if make_dependent:
items = frappe.get_all("Item", {'is_sales_item': 1})
customers = frappe.get_all("Customer")
warehouses = frappe.get_all("Warehouse")
if items and customers:
for i in range(3):
customer = random.choice(customers).name
make_opportunity(items, customer)
make_quote(items, customer)
if items and customers:
for i in range(3):
customer = random.choice(customers).name
make_opportunity(items, customer)
make_quote(items, customer)
make_projects(args.get('domain'))
if items and warehouses:
make_material_request(frappe.get_all("Item"))
make_projects(domain)
import_email_alert()
if items and warehouses:
make_material_request(frappe.get_all("Item"))
frappe.db.commit()
def make_opportunity(items, customer):