mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-05 06:28:29 +00:00
fix: remove bad defaults from selling settings
"All cusotmer groups" and "All territories" are pointless defaults, not
sure why these are made default. They don't help you track anything.
"All" might as well be `Null`.
Even the filters for customer_group suggest it shouldn't be group then
having the root as default makes no sense.
(cherry picked from commit 105b6d498c)
This commit is contained in:
committed by
Ankush Menat
parent
797b75224e
commit
93ee870bf9
@@ -8,7 +8,6 @@ import frappe
|
||||
from frappe.custom.doctype.property_setter.property_setter import make_property_setter
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import cint
|
||||
from frappe.utils.nestedset import get_root_of
|
||||
|
||||
|
||||
class SellingSettings(Document):
|
||||
@@ -37,9 +36,3 @@ class SellingSettings(Document):
|
||||
editable_bundle_item_rates = cint(self.editable_bundle_item_rates)
|
||||
|
||||
make_property_setter("Packed Item", "rate", "read_only", not(editable_bundle_item_rates), "Check", validate_fields_for_doctype=False)
|
||||
|
||||
def set_default_customer_group_and_territory(self):
|
||||
if not self.customer_group:
|
||||
self.customer_group = get_root_of('Customer Group')
|
||||
if not self.territory:
|
||||
self.territory = get_root_of('Territory')
|
||||
|
||||
@@ -304,7 +304,6 @@ def set_more_defaults():
|
||||
|
||||
def update_selling_defaults():
|
||||
selling_settings = frappe.get_doc("Selling Settings")
|
||||
selling_settings.set_default_customer_group_and_territory()
|
||||
selling_settings.cust_master_name = "Customer Name"
|
||||
selling_settings.so_required = "No"
|
||||
selling_settings.dn_required = "No"
|
||||
|
||||
Reference in New Issue
Block a user