mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
[patch] breakup global defaults
This commit is contained in:
@@ -104,7 +104,7 @@ class DocType(SellingController):
|
||||
|
||||
def so_required(self):
|
||||
"""check in manage account if sales order required or not"""
|
||||
if webnotes.conn.get_value('Global Defaults', 'Global Defaults', 'so_required') == 'Yes':
|
||||
if webnotes.conn.get_single_value("Selling Settings", 'so_required') == 'Yes':
|
||||
for d in getlist(self.doclist,'delivery_note_details'):
|
||||
if not d.prevdoc_docname:
|
||||
msgprint("Sales Order No. required against item %s"%d.item_code)
|
||||
|
||||
@@ -95,8 +95,7 @@ class DocType(BuyingController):
|
||||
Please enter a valid Challan No.", raise_exception=1)
|
||||
|
||||
def po_required(self):
|
||||
res = sql("select value from `tabSingles` where doctype = 'Global Defaults' and field = 'po_required'")
|
||||
if res and res[0][0]== 'Yes':
|
||||
if webnotes.conn.get_single_value("Buying Settings", "po_required") == 'Yes':
|
||||
for d in getlist(self.doclist,'purchase_receipt_details'):
|
||||
if not d.prevdoc_docname:
|
||||
msgprint("Purchse Order No. required against item %s"%d.item_code)
|
||||
|
||||
@@ -105,7 +105,7 @@ wn.module_page["Stock"] = [
|
||||
"label": wn._("Stock Settings"),
|
||||
"route": "Form/Stock Settings",
|
||||
"doctype":"Stock Settings",
|
||||
"description": "Settings for Stock"
|
||||
"description": "Settings for Stock Module"
|
||||
},
|
||||
{
|
||||
"route":"Sales Browser/Item Group",
|
||||
|
||||
Reference in New Issue
Block a user