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

This commit is contained in:
Nabin Hait
2013-07-04 16:03:24 +05:30
30 changed files with 572 additions and 347 deletions

View File

@@ -21,6 +21,8 @@ cur_frm.cscript.refresh = function(doc) {
// make sensitive fields(has_serial_no, is_stock_item, valuation_method)
// read only if any stock ledger entry exists
cur_frm.cscript.make_dashboard()
cur_frm.toggle_display("naming_series", sys_defaults.item_naming_by=="Naming Series"
&& doc.__islocal)
cur_frm.toggle_display("item_code", sys_defaults.item_naming_by!="Naming Series"
@@ -36,6 +38,12 @@ cur_frm.cscript.refresh = function(doc) {
}
}
cur_frm.cscript.make_dashboard = function() {
cur_frm.dashboard.reset();
if(doc.__islocal)
return;
}
cur_frm.cscript.item_code = function(doc) {
if(!doc.item_name) cur_frm.set_value("item_name", doc.item_code);
if(!doc.description) cur_frm.set_value("description", doc.item_code);

View File

@@ -204,7 +204,7 @@ class DocType(DocListController):
if vals and ((self.doc.is_stock_item == "No" and vals.is_stock_item == "Yes") or
vals.has_serial_no != self.doc.has_serial_no or
vals.valuation_method != self.doc.valuation_method):
cstr(vals.valuation_method) != cstr(self.doc.valuation_method)):
if self.check_if_sle_exists() == "exists":
webnotes.msgprint(_("As there are existing stock transactions for this \
item, you can not change the values of 'Has Serial No', \