From 41146657dee50d4571d5f4848e5f0f236923a36f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 14 Sep 2017 17:26:23 +0530 Subject: [PATCH] Set default customer group and territory after install --- .../setup/setup_wizard/install_fixtures.py | 5 + erpnext/setup/setup_wizard/setup_wizard.py | 1 - erpnext/tests/ui/tests.txt | 104 +++++++++--------- 3 files changed, 57 insertions(+), 53 deletions(-) diff --git a/erpnext/setup/setup_wizard/install_fixtures.py b/erpnext/setup/setup_wizard/install_fixtures.py index 54620122b2..67d7e932b8 100644 --- a/erpnext/setup/setup_wizard/install_fixtures.py +++ b/erpnext/setup/setup_wizard/install_fixtures.py @@ -267,3 +267,8 @@ def install(country=None): pass else: raise + + # set default customer group and territory + selling_settings = frappe.get_doc("Selling Settings") + selling_settings.set_default_customer_group_and_territory() + selling_settings.save() diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py index 09dc915cde..d3e4a084f5 100644 --- a/erpnext/setup/setup_wizard/setup_wizard.py +++ b/erpnext/setup/setup_wizard/setup_wizard.py @@ -177,7 +177,6 @@ def set_defaults(args): selling_settings.so_required = "No" selling_settings.dn_required = "No" selling_settings.allow_multiple_items = 1 - selling_settings.set_default_customer_group_and_territory() selling_settings.save() buying_settings = frappe.get_doc("Buying Settings") diff --git a/erpnext/tests/ui/tests.txt b/erpnext/tests/ui/tests.txt index 984358aca0..909216b92e 100644 --- a/erpnext/tests/ui/tests.txt +++ b/erpnext/tests/ui/tests.txt @@ -1,55 +1,55 @@ -# erpnext/tests/ui/make_fixtures.js #long -# erpnext/setup/doctype/company/tests/test_company.js -# erpnext/accounts/doctype/account/test_account.js -# erpnext/accounts/doctype/account/test_make_tax_account.js -# erpnext/accounts/doctype/pricing_rule/test_pricing_rule.js -# erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.js -# erpnext/accounts/doctype/purchase_taxes_and_charges_template/test_purchase_taxes_and_charges_template.js -# erpnext/accounts/doctype/shipping_rule/test_shipping_rule.js -# erpnext/crm/doctype/lead/test_lead.js -# erpnext/crm/doctype/opportunity/test_opportunity.js -# erpnext/setup/doctype/company/tests/test_company_production.js -# erpnext/crm/doctype/item/test_item.js -# erpnext/selling/doctype/quotation/tests/test_quotation_with_discount_on_grand_total.js -# erpnext/selling/doctype/quotation/tests/test_quotation_with_item_wise_discount.js -# erpnext/selling/doctype/quotation/tests/test_quotation_with_multi_uom.js -# erpnext/selling/doctype/quotation/tests/test_quotation_with_taxes_and_charges.js -# erpnext/selling/doctype/quotation/tests/test_quotation_with_shipping_rule.js -# erpnext/selling/doctype/quotation/tests/test_quotation.js -# erpnext/selling/doctype/sales_order/tests/test_sales_order.js -# erpnext/selling/doctype/sales_order/tests/test_sales_order_with_multiple_delivery_date.js -# erpnext/selling/doctype/sales_order/tests/test_sales_order_with_item_wise_discount.js -# erpnext/selling/doctype/sales_order/tests/test_sales_order_with_multi_uom.js -# erpnext/selling/doctype/sales_order/tests/test_sales_order_with_discount_on_grand_total.js -# erpnext/selling/doctype/sales_order/tests/test_sales_order_with_taxes_and_charges.js -# erpnext/selling/doctype/sales_order/tests/test_sales_order_with_shipping_rule.js -# erpnext/selling/doctype/sales_order/tests/test_sales_order_with_pricing_rule.js -# erpnext/manufacturing/doctype/workstation/test_workstation.js -# erpnext/manufacturing/doctype/operation/test_operation.js -# erpnext/manufacturing/doctype/bom/test_bom.js -# erpnext/projects/doctype/project/project_timesheet.js -# erpnext/hr/doctype/holiday_list/test_holiday_list.js -# erpnext/hr/doctype/branch/test_branch.js -# erpnext/hr/doctype/leave_block_list/test_leave_block_list.js -# erpnext/hr/doctype/department/test_department.js -# erpnext/hr/doctype/designation/test_designation.js -# erpnext/hr/doctype/employment_type/test_employment_type.js -# erpnext/hr/doctype/employee/test_employee.js -# erpnext/hr/doctype/employee_attendance_tool/test_employee_attendance_tool.js -# erpnext/hr/doctype/attendance/test_attendance.js -# erpnext/hr/doctype/leave_type/test_leave_type.js -# erpnext/hr/doctype/leave_control_panel/test_leave_control_panel.js -# erpnext/hr/doctype/leave_allocation/test_leave_allocation.js -# erpnext/hr/doctype/leave_application/test_leave_application.js -# erpnext/schools/doctype/academic_year/test_academic_year.js -# erpnext/schools/doctype/academic_term/test_academic_term.js -# erpnext/schools/doctype/school_settings/test_school_settings.js -# erpnext/schools/doctype/student_batch_name/test_student_batch_name.js -# erpnext/schools/doctype/student_category/test_student_category.js -# erpnext/schools/doctype/room/test_room.js -# erpnext/schools/doctype/instructor/test_instructor.js -# erpnext/stock/doctype/warehouse/test_warehouse.js -# erpnext/manufacturing/doctype/production_order/test_production_order.js #long +erpnext/tests/ui/make_fixtures.js #long +erpnext/setup/doctype/company/tests/test_company.js +erpnext/accounts/doctype/account/test_account.js +erpnext/accounts/doctype/account/test_make_tax_account.js +erpnext/accounts/doctype/pricing_rule/test_pricing_rule.js +erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.js +erpnext/accounts/doctype/purchase_taxes_and_charges_template/test_purchase_taxes_and_charges_template.js +erpnext/accounts/doctype/shipping_rule/test_shipping_rule.js +erpnext/crm/doctype/lead/test_lead.js +erpnext/crm/doctype/opportunity/test_opportunity.js +erpnext/setup/doctype/company/tests/test_company_production.js +erpnext/crm/doctype/item/test_item.js +erpnext/selling/doctype/quotation/tests/test_quotation_with_discount_on_grand_total.js +erpnext/selling/doctype/quotation/tests/test_quotation_with_item_wise_discount.js +erpnext/selling/doctype/quotation/tests/test_quotation_with_multi_uom.js +erpnext/selling/doctype/quotation/tests/test_quotation_with_taxes_and_charges.js +erpnext/selling/doctype/quotation/tests/test_quotation_with_shipping_rule.js +erpnext/selling/doctype/quotation/tests/test_quotation.js +erpnext/selling/doctype/sales_order/tests/test_sales_order.js +erpnext/selling/doctype/sales_order/tests/test_sales_order_with_multiple_delivery_date.js +erpnext/selling/doctype/sales_order/tests/test_sales_order_with_item_wise_discount.js +erpnext/selling/doctype/sales_order/tests/test_sales_order_with_multi_uom.js +erpnext/selling/doctype/sales_order/tests/test_sales_order_with_discount_on_grand_total.js +erpnext/selling/doctype/sales_order/tests/test_sales_order_with_taxes_and_charges.js +erpnext/selling/doctype/sales_order/tests/test_sales_order_with_shipping_rule.js +erpnext/selling/doctype/sales_order/tests/test_sales_order_with_pricing_rule.js +erpnext/manufacturing/doctype/workstation/test_workstation.js +erpnext/manufacturing/doctype/operation/test_operation.js +erpnext/manufacturing/doctype/bom/test_bom.js +erpnext/projects/doctype/project/project_timesheet.js +erpnext/hr/doctype/holiday_list/test_holiday_list.js +erpnext/hr/doctype/branch/test_branch.js +erpnext/hr/doctype/leave_block_list/test_leave_block_list.js +erpnext/hr/doctype/department/test_department.js +erpnext/hr/doctype/designation/test_designation.js +erpnext/hr/doctype/employment_type/test_employment_type.js +erpnext/hr/doctype/employee/test_employee.js +erpnext/hr/doctype/employee_attendance_tool/test_employee_attendance_tool.js +erpnext/hr/doctype/attendance/test_attendance.js +erpnext/hr/doctype/leave_type/test_leave_type.js +erpnext/hr/doctype/leave_control_panel/test_leave_control_panel.js +erpnext/hr/doctype/leave_allocation/test_leave_allocation.js +erpnext/hr/doctype/leave_application/test_leave_application.js +erpnext/schools/doctype/academic_year/test_academic_year.js +erpnext/schools/doctype/academic_term/test_academic_term.js +erpnext/schools/doctype/school_settings/test_school_settings.js +erpnext/schools/doctype/student_batch_name/test_student_batch_name.js +erpnext/schools/doctype/student_category/test_student_category.js +erpnext/schools/doctype/room/test_room.js +erpnext/schools/doctype/instructor/test_instructor.js +erpnext/stock/doctype/warehouse/test_warehouse.js +erpnext/manufacturing/doctype/production_order/test_production_order.js #long erpnext/selling/page/point_of_sale/tests/test_point_of_sale.js erpnext/accounts/page/pos/test_pos.js erpnext/selling/doctype/product_bundle/test_product_bundle.js