[setup] bug fixes
This commit is contained in:
parent
5381bdd730
commit
65d12926fd
@ -8,6 +8,6 @@ class DocType:
|
|||||||
self.doc, self.doclist = d, dl
|
self.doc, self.doclist = d, dl
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
for key in ["supplier_type", "maintain_same_rate"]:
|
for key in ["supplier_type", "supp_master_name", "maintain_same_rate"]:
|
||||||
webnotes.conn.set_default(key, self.doc.fields.get(key, ""))
|
webnotes.conn.set_default(key, self.doc.fields.get(key, ""))
|
||||||
|
|
@ -15,12 +15,16 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|||||||
var refdoc = wn.model.get_doc(last_route[1], last_route[2]);
|
var refdoc = wn.model.get_doc(last_route[1], last_route[2]);
|
||||||
cur_frm.set_value("customer", refdoc.customer || refdoc.name);
|
cur_frm.set_value("customer", refdoc.customer || refdoc.name);
|
||||||
cur_frm.set_value("customer_name", refdoc.customer_name);
|
cur_frm.set_value("customer_name", refdoc.customer_name);
|
||||||
|
if(cur_frm.doc.doctype==="Address")
|
||||||
|
cur_frm.set_value("address_title", cur_frm.doc.customer)
|
||||||
}
|
}
|
||||||
if(["Supplier", "Supplier Quotation", "Purchase Order", "Purchase Invoice", "Purchase Receipt"]
|
if(["Supplier", "Supplier Quotation", "Purchase Order", "Purchase Invoice", "Purchase Receipt"]
|
||||||
.indexOf(last_route[1])!==-1) {
|
.indexOf(last_route[1])!==-1) {
|
||||||
var customer = wn.model.get_doc(last_route[1], last_route[2]);
|
var refdoc = wn.model.get_doc(last_route[1], last_route[2]);
|
||||||
cur_frm.set_value("supplier", refdoc.supplier || refdoc.name);
|
cur_frm.set_value("supplier", refdoc.supplier || refdoc.name);
|
||||||
cur_frm.set_value("supplier_name", refdoc.supplier_name);
|
cur_frm.set_value("supplier_name", refdoc.supplier_name);
|
||||||
|
if(cur_frm.doc.doctype==="Address")
|
||||||
|
cur_frm.set_value("address_title", cur_frm.doc.supplier)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ class DocType:
|
|||||||
stock_settings.save()
|
stock_settings.save()
|
||||||
|
|
||||||
selling_settings = webnotes.bean("Selling Settings")
|
selling_settings = webnotes.bean("Selling Settings")
|
||||||
selling_settings.cust_master_name = "Customer Name"
|
selling_settings.doc.cust_master_name = "Customer Name"
|
||||||
selling_settings.doc.so_required = "No"
|
selling_settings.doc.so_required = "No"
|
||||||
selling_settings.doc.dn_required = "No"
|
selling_settings.doc.dn_required = "No"
|
||||||
selling_settings.save()
|
selling_settings.save()
|
||||||
|
@ -73,11 +73,6 @@ wn.pages['Setup'].onload = function(wrapper) {
|
|||||||
+'</div>')
|
+'</div>')
|
||||||
.appendTo(row);
|
.appendTo(row);
|
||||||
|
|
||||||
if(dependency)
|
|
||||||
col.addClass("col-offset-1");
|
|
||||||
else
|
|
||||||
$('<div class="col col-lg-1"></div>').appendTo(row);
|
|
||||||
|
|
||||||
col.find(".badge")
|
col.find(".badge")
|
||||||
.css({
|
.css({
|
||||||
"background-color": (item.count ? "green" : "orange"),
|
"background-color": (item.count ? "green" : "orange"),
|
||||||
@ -89,13 +84,18 @@ wn.pages['Setup'].onload = function(wrapper) {
|
|||||||
if(item.count)
|
if(item.count)
|
||||||
completed += 1;
|
completed += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(dependency)
|
||||||
|
col.addClass("col-offset-1");
|
||||||
|
else
|
||||||
|
$('<div class="col col-lg-1"></div>').appendTo(row);
|
||||||
|
|
||||||
if(item.doctype) {
|
if(item.doctype) {
|
||||||
col.find(".badge")
|
col.find(".badge")
|
||||||
.attr("data-doctype", item.doctype)
|
.attr("data-doctype", item.doctype)
|
||||||
.css({"cursor": "pointer"})
|
.css({"cursor": "pointer"})
|
||||||
.click(function() {
|
.click(function() {
|
||||||
wn.set_route("List", $(this).attr("data-doctype"))
|
wn.set_route(item.tree || "List", $(this).attr("data-doctype"))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@ items = [
|
|||||||
{"doctype":"UOM"},
|
{"doctype":"UOM"},
|
||||||
{"doctype":"Brand"},
|
{"doctype":"Brand"},
|
||||||
{"doctype":"Price List"},
|
{"doctype":"Price List"},
|
||||||
|
{ "title": "Stock Settings",
|
||||||
|
"route": "Form/Stock Settings", "type": "Link", "icon": "icon-cog" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -48,6 +50,8 @@ items = [
|
|||||||
{"doctype":"Sales Person", "tree": "Sales Browser"},
|
{"doctype":"Sales Person", "tree": "Sales Browser"},
|
||||||
{"doctype":"Contact"},
|
{"doctype":"Contact"},
|
||||||
{"doctype":"Address"},
|
{"doctype":"Address"},
|
||||||
|
{ "title": "Selling Settings",
|
||||||
|
"route": "Form/Selling Settings", "type": "Link", "icon": "icon-cog" },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -56,6 +60,8 @@ items = [
|
|||||||
{"doctype":"Supplier Type"},
|
{"doctype":"Supplier Type"},
|
||||||
{"doctype":"Contact"},
|
{"doctype":"Contact"},
|
||||||
{"doctype":"Address"},
|
{"doctype":"Address"},
|
||||||
|
{ "title": "Buying Settings",
|
||||||
|
"route": "Form/Buying Settings", "type": "Link", "icon": "icon-cog" },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-03 10:45:46",
|
"creation": "2013-05-03 10:45:46",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-06-13 16:17:42",
|
"modified": "2013-06-26 21:39:46",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -838,6 +838,7 @@
|
|||||||
"read_only": 0
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "show_in_website",
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "copy_from_item_group",
|
"fieldname": "copy_from_item_group",
|
||||||
"fieldtype": "Button",
|
"fieldtype": "Button",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user