[global defaults] breakup added buying settings and selling settings
This commit is contained in:
parent
664ba4001f
commit
9132de5e4c
0
buying/doctype/buying_settings/__init__.py
Normal file
0
buying/doctype/buying_settings/__init__.py
Normal file
13
buying/doctype/buying_settings/buying_settings.py
Normal file
13
buying/doctype/buying_settings/buying_settings.py
Normal file
@ -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, ""))
|
||||
|
83
buying/doctype/buying_settings/buying_settings.txt
Normal file
83
buying/doctype/buying_settings/buying_settings.txt
Normal file
@ -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"
|
||||
}
|
||||
]
|
0
selling/doctype/selling_settings/__init__.py
Normal file
0
selling/doctype/selling_settings/__init__.py
Normal file
12
selling/doctype/selling_settings/selling_settings.py
Normal file
12
selling/doctype/selling_settings/selling_settings.py
Normal file
@ -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, ""))
|
93
selling/doctype/selling_settings/selling_settings.txt
Normal file
93
selling/doctype/selling_settings/selling_settings.txt
Normal file
@ -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": "<a href=\"#Sales Browser/Customer Group\">Manage Customer Groups</a>",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "customer_group",
|
||||
"fieldtype": "Link",
|
||||
"label": "Default Customer Group",
|
||||
"options": "Customer Group"
|
||||
},
|
||||
{
|
||||
"description": "<a href=\"#Sales Browser/Territory\">Territory</a>",
|
||||
"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"
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user