disable save button

This commit is contained in:
Nabin Hait 2012-12-14 14:36:17 +05:30
parent 13d2e74886
commit f3faead478
2 changed files with 8 additions and 0 deletions

View File

@ -15,6 +15,10 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
cur_frm.cscript.refresh = function(doc) {
cur_frm.disable_save();
}
cur_frm.set_query("current_bom", function(doc) {
return erpnext.queries.bom({name: "!" + doc.new_bom});
});

View File

@ -19,6 +19,10 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
refresh_field("company");
}
cur_frm.cscript.refresh = function(doc) {
cur_frm.disable_save();
}
cur_frm.cscript.sales_order = function(doc,cdt,cdn) {
var d = locals[cdt][cdn];
if (d.sales_order) {