Merge branch 'responsive' of github.com:webnotes/erpnext into responsive

This commit is contained in:
Anand Doshi 2013-06-27 12:17:59 +05:30
commit b8ea244b9f
7 changed files with 23 additions and 11 deletions

View File

@ -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, ""))

View File

@ -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)
} }
} }
} }

View File

@ -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()

View File

@ -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"),
@ -90,12 +85,17 @@ wn.pages['Setup'].onload = function(wrapper) {
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"))
}) })
} }

View File

@ -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" },
] ]
}, },
{ {
@ -109,6 +115,7 @@ items = [
"title": "Printing", "title": "Printing",
"icon": "icon-print" "icon": "icon-print"
}, },
{ "doctype": "Terms and Conditions" },
{ "doctype": "Letter Head" }, { "doctype": "Letter Head" },
{ "doctype": "Print Heading" }, { "doctype": "Print Heading" },
{ "doctype": "Print Format", "filter": {"standard": "No"} }, { "doctype": "Print Format", "filter": {"standard": "No"} },

View File

@ -32,7 +32,7 @@ class DocType(DocListController):
from webnotes.model.doc import make_autoname from webnotes.model.doc import make_autoname
self.doc.item_code = make_autoname(self.doc.naming_series+'.#####') self.doc.item_code = make_autoname(self.doc.naming_series+'.#####')
elif not self.doc.item_code: elif not self.doc.item_code:
msgprint(_("Item Code is mandatory"), raise_exception=1) msgprint(_("Item Code (item_code) is mandatory because Item naming is not sequential."), raise_exception=1)
self.doc.name = self.doc.item_code self.doc.name = self.doc.item_code

View File

@ -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",