Ok. fixtures "Custom Filed" works!
But now i need to know where i put my handler for the custom field of type ('Button').
I try to put it in custom script for the Customer doctype, some thing like this:
frappe.ui.form.on("Customer", "validate_vat", function(ev){ <-- validate_vat is the field name of the button
console.log("button was clicked! ", ev.doc.vat_or_nif);<-- that ok, but i feel that is not the wright way.
//here i will call, of course, a whitelist method...
});
I would like soem thins like cur_frm.on("click", "validate_vat", func);
I realize that when i click the button i get this:
Traceback (innermost last):
File "/vagrant/frappe-bench/apps/frappe/frappe/app.py", line 49, in application
response = frappe.handler.handle()
File "/vagrant/frappe-bench/apps/frappe/frappe/handler.py", line 66, in handle
execute_cmd(cmd)
File "/vagrant/frappe-bench/apps/frappe/frappe/handler.py", line 89, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/vagrant/frappe-bench/apps/frappe/frappe/__init__.py", line 531, in call
return fn(*args, **newargs)
TypeError: runserverobj() takes at least 1 argument (1 given)
return fn(*args, **newargs) <-- where i put my function?? What is he calling??
What is the wright way?
Thanks.