From 75443a94ee05db66916aabced04af33bcf4f9a18 Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Tue, 21 Nov 2017 16:12:40 +0530 Subject: [PATCH] [minor] set the pos profile name while creating demo (#11664) --- erpnext/demo/setup/setup_data.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/erpnext/demo/setup/setup_data.py b/erpnext/demo/setup/setup_data.py index 34e9a3e572..d395493c47 100644 --- a/erpnext/demo/setup/setup_data.py +++ b/erpnext/demo/setup/setup_data.py @@ -348,8 +348,10 @@ def setup_budget(): budget.action_if_annual_budget_exceeded = "Warn" 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"}) - }, unique="account") + add_random_children(budget, "accounts", rows=random.randint(10, expense_ledger_count), + randomize = { + "account": ("Account", {"is_group": "0", "root_type": "Expense"}) + }, unique="account") for d in budget.accounts: d.budget_amount = random.randint(5, 100) * 10000 @@ -361,6 +363,7 @@ def setup_pos_profile(): company_abbr = frappe.db.get_value("Company", erpnext.get_default_company(), "abbr") pos = frappe.new_doc('POS Profile') pos.user = frappe.db.get_global('demo_accounts_user') + pos.pos_profile_name = "Demo POS Profile" pos.naming_series = 'SINV-' pos.update_stock = 0 pos.write_off_account = 'Cost of Goods Sold - '+ company_abbr