fixes in button function calling
This commit is contained in:
parent
c394d668ca
commit
46673a7401
3 changed files with 4 additions and 3 deletions
|
|
@ -1272,8 +1272,9 @@ _f.ButtonField.prototype.make_input = function() { var me = this;
|
|||
this.input.onclick = function() {
|
||||
if(me.not_in_form) return;
|
||||
this.disabled = 'disabled';
|
||||
if(cur_frm.cscript[me.df.label] && (!me.in_filter)) {
|
||||
cur_frm.runclientscript(me.df.label, me.doctype, me.docname);
|
||||
|
||||
if(cur_frm.cscript[me.df.fieldname] && (!me.in_filter)) {
|
||||
cur_frm.runclientscript(me.df.fieldname, me.doctype, me.docname);
|
||||
this.disabled = false;
|
||||
} else {
|
||||
cur_frm.runscript(me.df.options, me);
|
||||
|
|
|
|||
|
|
@ -1102,6 +1102,7 @@ _f.set_value = function(dt, dn, fn, v) {
|
|||
if(changed) {
|
||||
d[fn] = v;
|
||||
d.__unsaved = 1;
|
||||
console.log('Not able to find formview - check form.js');
|
||||
var frm = wn.views.formview[d.doctype].frm;
|
||||
try {
|
||||
if(d.parent && d.parenttype) {
|
||||
|
|
|
|||
|
|
@ -178,7 +178,6 @@ def run_server_obj(server_obj, method_name, arg=None):
|
|||
"""
|
||||
Executes a method (`method_name`) from the given object (`server_obj`)
|
||||
"""
|
||||
|
||||
if server_obj and hasattr(server_obj, method_name):
|
||||
if arg:
|
||||
return getattr(server_obj, method_name)(arg)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue