[minor] set the pos profile name while creating demo (#11664)

This commit is contained in:
Makarand Bauskar 2017-11-21 16:12:40 +05:30 committed by Nabin Hait
parent cc884578b5
commit 75443a94ee

View File

@ -348,7 +348,9 @@ def setup_budget():
budget.action_if_annual_budget_exceeded = "Warn" budget.action_if_annual_budget_exceeded = "Warn"
expense_ledger_count = frappe.db.count("Account", {"is_group": "0", "root_type": "Expense"}) expense_ledger_count = frappe.db.count("Account", {"is_group": "0", "root_type": "Expense"})
add_random_children(budget, "accounts", rows=random.randint(10, expense_ledger_count), randomize = { "account": ("Account", {"is_group": "0", "root_type": "Expense"}) add_random_children(budget, "accounts", rows=random.randint(10, expense_ledger_count),
randomize = {
"account": ("Account", {"is_group": "0", "root_type": "Expense"})
}, unique="account") }, unique="account")
for d in budget.accounts: for d in budget.accounts:
@ -361,6 +363,7 @@ def setup_pos_profile():
company_abbr = frappe.db.get_value("Company", erpnext.get_default_company(), "abbr") company_abbr = frappe.db.get_value("Company", erpnext.get_default_company(), "abbr")
pos = frappe.new_doc('POS Profile') pos = frappe.new_doc('POS Profile')
pos.user = frappe.db.get_global('demo_accounts_user') pos.user = frappe.db.get_global('demo_accounts_user')
pos.pos_profile_name = "Demo POS Profile"
pos.naming_series = 'SINV-' pos.naming_series = 'SINV-'
pos.update_stock = 0 pos.update_stock = 0
pos.write_off_account = 'Cost of Goods Sold - '+ company_abbr pos.write_off_account = 'Cost of Goods Sold - '+ company_abbr