diff --git a/buying/doctype/buying_settings/__init__.py b/buying/doctype/buying_settings/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/buying/doctype/buying_settings/buying_settings.py b/buying/doctype/buying_settings/buying_settings.py
new file mode 100644
index 0000000000..7a97349f22
--- /dev/null
+++ b/buying/doctype/buying_settings/buying_settings.py
@@ -0,0 +1,13 @@
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+class DocType:
+ def __init__(self, d, dl):
+ self.doc, self.doclist = d, dl
+
+ def validate(self):
+ for key in ["supplier_type", "maintain_same_rate"]:
+ webnotes.conn.set_default(key, self.doc.fields.get(key, ""))
+
\ No newline at end of file
diff --git a/buying/doctype/buying_settings/buying_settings.txt b/buying/doctype/buying_settings/buying_settings.txt
new file mode 100644
index 0000000000..eb0da1d2af
--- /dev/null
+++ b/buying/doctype/buying_settings/buying_settings.txt
@@ -0,0 +1,83 @@
+[
+ {
+ "creation": "2013-06-25 11:04:03",
+ "docstatus": 0,
+ "modified": "2013-06-25 11:43:08",
+ "modified_by": "Administrator",
+ "owner": "Administrator"
+ },
+ {
+ "description": "Settings for Buying Module",
+ "doctype": "DocType",
+ "document_type": "Other",
+ "issingle": 1,
+ "module": "Buying",
+ "name": "__common__"
+ },
+ {
+ "doctype": "DocField",
+ "name": "__common__",
+ "parent": "Buying Settings",
+ "parentfield": "fields",
+ "parenttype": "DocType",
+ "permlevel": 0
+ },
+ {
+ "create": 1,
+ "doctype": "DocPerm",
+ "name": "__common__",
+ "parent": "Buying Settings",
+ "parentfield": "permissions",
+ "parenttype": "DocType",
+ "permlevel": 0,
+ "read": 1,
+ "role": "System Manager",
+ "write": 1
+ },
+ {
+ "doctype": "DocType",
+ "name": "Buying Settings"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "supp_master_name",
+ "fieldtype": "Select",
+ "label": "Supplier Naming By",
+ "options": "Supplier Name\nNaming Series"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "supplier_type",
+ "fieldtype": "Link",
+ "label": "Default Supplier Type",
+ "options": "Supplier Type"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "column_break_3",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "maintain_same_rate",
+ "fieldtype": "Check",
+ "label": "Maintain same rate throughout purchase cycle"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "po_required",
+ "fieldtype": "Select",
+ "label": "Purchase Order Required",
+ "options": "No\nYes"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "pr_required",
+ "fieldtype": "Select",
+ "label": "Purchase Receipt Required",
+ "options": "No\nYes"
+ },
+ {
+ "doctype": "DocPerm"
+ }
+]
\ No newline at end of file
diff --git a/selling/doctype/selling_settings/__init__.py b/selling/doctype/selling_settings/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/selling/doctype/selling_settings/selling_settings.py b/selling/doctype/selling_settings/selling_settings.py
new file mode 100644
index 0000000000..5a5dc4c789
--- /dev/null
+++ b/selling/doctype/selling_settings/selling_settings.py
@@ -0,0 +1,12 @@
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+class DocType:
+ def __init__(self, d, dl):
+ self.doc, self.doclist = d, dl
+
+ def validate(self):
+ for key in ["cust_master_name", "customer_group", "territory"]:
+ webnotes.conn.set_default(key, self.doc.fields.get(key, ""))
diff --git a/selling/doctype/selling_settings/selling_settings.txt b/selling/doctype/selling_settings/selling_settings.txt
new file mode 100644
index 0000000000..a08964d82a
--- /dev/null
+++ b/selling/doctype/selling_settings/selling_settings.txt
@@ -0,0 +1,93 @@
+[
+ {
+ "creation": "2013-06-25 10:25:16",
+ "docstatus": 0,
+ "modified": "2013-06-25 10:52:35",
+ "modified_by": "Administrator",
+ "owner": "Administrator"
+ },
+ {
+ "description": "Settings for Selling Module",
+ "doctype": "DocType",
+ "document_type": "Other",
+ "issingle": 1,
+ "module": "Selling",
+ "name": "__common__"
+ },
+ {
+ "doctype": "DocField",
+ "name": "__common__",
+ "parent": "Selling Settings",
+ "parentfield": "fields",
+ "parenttype": "DocType",
+ "permlevel": 0
+ },
+ {
+ "create": 1,
+ "doctype": "DocPerm",
+ "name": "__common__",
+ "parent": "Selling Settings",
+ "parentfield": "permissions",
+ "parenttype": "DocType",
+ "permlevel": 0,
+ "read": 1,
+ "role": "System Manager",
+ "write": 1
+ },
+ {
+ "doctype": "DocType",
+ "name": "Selling Settings"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "cust_master_name",
+ "fieldtype": "Select",
+ "label": "Customer Naming By",
+ "options": "Customer Name\nNaming Series"
+ },
+ {
+ "description": "Manage Customer Groups",
+ "doctype": "DocField",
+ "fieldname": "customer_group",
+ "fieldtype": "Link",
+ "label": "Default Customer Group",
+ "options": "Customer Group"
+ },
+ {
+ "description": "Territory",
+ "doctype": "DocField",
+ "fieldname": "territory",
+ "fieldtype": "Link",
+ "label": "Default Territory",
+ "options": "Territory"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "price_list_name",
+ "fieldtype": "Link",
+ "label": "Default Price List",
+ "options": "Price List"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "column_break_5",
+ "fieldtype": "Column Break"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "so_required",
+ "fieldtype": "Select",
+ "label": "Sales Order Required",
+ "options": "No\nYes"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "dn_required",
+ "fieldtype": "Select",
+ "label": "Delivery Note Required",
+ "options": "No\nYes"
+ },
+ {
+ "doctype": "DocPerm"
+ }
+]
\ No newline at end of file